Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { ReloadPeriod time.Duration `yaml:"period" category:"advanced"` // LoadPath contains the path to the runtime config files. // Requires a non-empty value LoadPath flagext.StringSliceCSV `yaml:"file"` Loader Loader `yaml:"-"` }
Config holds the config for an Manager instance. It holds config related to loading per-tenant config.
func (*Config) RegisterFlags ¶
RegisterFlags registers flags.
type Manager ¶
Manager periodically reloads the configuration from specified files, and keeps this configuration available for clients.
func New ¶
func New(cfg Config, configName string, registerer prometheus.Registerer, logger log.Logger) (*Manager, error)
New creates an instance of Manager. Manager is a services.Service, and must be explicitly started to perform any work.
func (*Manager) CloseListenerChannel ¶
func (om *Manager) CloseListenerChannel(listener <-chan interface{})
CloseListenerChannel removes given channel from list of channels to send notifications to and closes channel.
func (*Manager) CreateListenerChannel ¶
CreateListenerChannel creates new channel that can be used to receive new config values. If there is no receiver waiting for value when config manager tries to send the update, or channel buffer is full, update is discarded.
When config manager is stopped, it closes all channels to notify receivers that they will not receive any more updates.