Module dynamic

Module dynamic 

Source
Expand description

Dynamic configuration.

A configuration producer publishes ConfigSettings over a stream of ConfigUpdates. Two things consume that stream. A caller wanting a live by-key view hands the initial snapshot to ConfigurationLoader::with_dynamic_configuration, then passes each later update to the ConfigUpdater that into_generic returns. The updater keeps a GenericConfiguration current and reports each change through ConfigChangeEvent or a FieldUpdateWatcher. A caller wanting its own representation takes ConfigSetting and ConfigUpdate alone and folds them itself.

Structs§

ConfigChangeEvent
An event that occurs when the configuration changes.
ConfigSetting
A single configuration setting, as published by a configuration producer.
FieldUpdateWatcher
A watcher for a specific configuration key.

Enums§

ConfigUpdate
An update message for the dynamic configuration state, sent from the config stream to the updater task.
Provenance
Whether a configuration setting was set explicitly, or merely defaulted.

Functions§

diff_config
Diffs two configuration values and returns a list of changes.
settings_to_state
Builds the nested state tree described by settings.