Documentation ¶
Index ¶
- Constants
- func ListenForChanges(ctx context.Context, wg *sync.WaitGroup, config interfaces.Configuration, ...)
- func LoadFromFile(configDir, profileDir, configFileName string, config interfaces.Configuration) error
- func OverrideFromEnvironment(registry config.RegistryInfo, startup config.StartupInfo) (config.RegistryInfo, config.StartupInfo)
- func UpdateFromRegistry(ctx context.Context, startupTimer startup.Timer, ...) (registry.Client, error)
Constants ¶
const ( ConfigRegistryStemCore = "edgex/core/" ConfigMajorVersion = "1.0/" WritableKey = "/Writable" )
Variables ¶
This section is empty.
Functions ¶
func ListenForChanges ¶
func ListenForChanges( ctx context.Context, wg *sync.WaitGroup, config interfaces.Configuration, loggingClient logger.LoggingClient, registryClient registry.Client)
ListenForChanges leverages the registry client's WatchForChanges() method to receive changes to and update the service's configuration struct's writable substruct. It's assumed the log level is universally part of the writable struct and this function explicitly updates the loggingClient's log level when new configuration changes are received.
func LoadFromFile ¶
func LoadFromFile(configDir, profileDir, configFileName string, config interfaces.Configuration) error
LoadFromFile attempts to read and unmarshal toml-based configuration into a configuration struct.
func OverrideFromEnvironment ¶
func OverrideFromEnvironment( registry config.RegistryInfo, startup config.StartupInfo) (config.RegistryInfo, config.StartupInfo)
OverrideFromEnvironment overrides the registryInfo values from an environment variable value (if it exists).
func UpdateFromRegistry ¶
func UpdateFromRegistry( ctx context.Context, startupTimer startup.Timer, config interfaces.Configuration, loggingClient logger.LoggingClient, serviceKey string) (registry.Client, error)
UpdateFromRegistry connects to the registry, registers the service, gets configuration, and updates the service's configuration struct.
Types ¶
This section is empty.