Documentation
¶
Overview ¶
Package configops owns the configuration field operations of one gateway process: the schema, the effective report, validation, a source connection test, field saves, and operation receipts. A local deployment saves to its configuration file. A shared deployment saves to the shared revision store.
Index ¶
- type Options
- type Probe
- type Service
- func (s *Service) Effective() config.EffectiveReport
- func (s *Service) Receipt(ctx context.Context, operationID string) (config.Receipt, bool, error)
- func (s *Service) Save(ctx context.Context, request config.FieldSave, actor string) (config.Receipt, error)
- func (s *Service) Schema() []config.SchemaSetting
- func (s *Service) TestConnection(ctx context.Context, request config.FieldSave) (config.ConnectionResult, error)
- func (s *Service) Validate(ctx context.Context, request config.FieldSave) (config.Validation, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Options ¶
type Options struct {
// Store is the shared revision store. Shared management requires it.
Store *configrevision.Store
// LocalAudit records a local save.
LocalAudit config.LocalAudit
// Observe records the newest stored head after a shared save. The
// receipt then reports the desired revision of this process.
Observe func(context.Context) error
// Probe tests the catalog source. A nil probe refuses the test.
Probe Probe
}
Options supplies the adapters of a Service.
type Probe ¶
type Probe func(ctx context.Context, catalog config.CatalogConfig) error
Probe checks that the catalog source of the settings answers. Its error must not hold a credential.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service runs configuration operations against the authority that the management mode selects. Schema and Effective read process memory only.
func (*Service) Effective ¶
func (s *Service) Effective() config.EffectiveReport
Effective returns the redacted effective configuration from memory.
func (*Service) Receipt ¶
Receipt returns the receipt of an operation ID. It reports false when the operation ID saved nothing.
func (*Service) Save ¶
func (s *Service) Save(ctx context.Context, request config.FieldSave, actor string) (config.Receipt, error)
Save writes a field save. A local save publishes the configuration file. A shared save commits the next revision when the head is at the expected sequence. An exact retry returns the original receipt. A refusal is a *config.Refusal error.
func (*Service) Schema ¶
func (s *Service) Schema() []config.SchemaSetting
Schema returns the configuration setting descriptors.
func (*Service) TestConnection ¶
func (s *Service) TestConnection(ctx context.Context, request config.FieldSave) (config.ConnectionResult, error)
TestConnection probes the catalog source of the effective settings, or of the settings with the request edits applied. It writes nothing, and the result never holds a credential or a source URL.