Documentation
¶
Overview ¶
Package config manages RouterConfiguration persisted in the RouterConfiguration bucket.
Index ¶
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) Get ¶
func (s *Service) Get() (models.RouterConfiguration, error)
Get returns the stored RouterConfiguration. Fields that were never persisted (old rows predate them) fall back to defaults: zero is never a valid value for the ranged fields, so normalizing it is safe.
func (*Service) Put ¶
func (s *Service) Put(cfg models.RouterConfiguration) error
Put validates and persists RouterConfiguration.
func (*Service) SetOnChanged ¶
func (s *Service) SetOnChanged(fn func(models.RouterConfiguration))
SetOnChanged registers a callback invoked after a successful Put.
Click to show internal directories.
Click to hide internal directories.