Documentation
¶
Overview ¶
Package config manages RouterConfiguration persisted in the instance_settings row: the configuration columns plus the bootstrapped flag.
Index ¶
- type Service
- func (s *Service) GetSettings(ctx context.Context) (models.RouterConfiguration, error)
- func (s *Service) IsBootstrapped(ctx context.Context) (bool, error)
- func (s *Service) PutSettings(ctx context.Context, configuration models.RouterConfiguration) error
- func (s *Service) SetBootstrapped(ctx context.Context) error
- func (s *Service) SetLogger(l *slog.Logger)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service manages RouterConfiguration.
func (*Service) GetSettings ¶ added in v0.4.0
GetSettings returns the stored RouterConfiguration from instance_settings. A missing row returns the zero configuration, matching the previous behavior.
func (*Service) IsBootstrapped ¶ added in v0.4.0
IsBootstrapped reports the instance_settings bootstrapped flag. A missing row reads false: unknown state never reports bootstrapped.
func (*Service) PutSettings ¶ added in v0.4.0
PutSettings validates and persists RouterConfiguration to instance_settings. The bootstrapped flag survives the write: one transaction reads the row and upserts the merged record through the transaction handle only.
func (*Service) SetBootstrapped ¶ added in v0.4.0
SetBootstrapped marks the instance bootstrapped and preserves the stored configuration columns. One transaction, transaction handle only.