Documentation ¶
Index ¶
- func GetCommonConfigFileName(lc logger.LoggingClient, commonConfigFileName string) string
- func GetConfigDir(lc logger.LoggingClient, configDir string) string
- func GetConfigFileName(lc logger.LoggingClient, configFileName string) string
- func GetProfileDir(lc logger.LoggingClient, profileDir string) string
- func GetRemoteServiceHosts(lc logger.LoggingClient, remoteHosts []string) []string
- func GetURIRequestTimeout(lc logger.LoggingClient) time.Duration
- type StartupInfo
- type Variables
- func (e *Variables) OverrideConfigMapValues(configMap map[string]any) (int, error)
- func (e *Variables) OverrideConfigProviderInfo(configProviderInfo types.ServiceConfig) (types.ServiceConfig, error)
- func (e *Variables) OverrideConfiguration(serviceConfig any) (int, error)
- func (e *Variables) UseRegistry() (bool, bool)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetCommonConfigFileName ¶
func GetCommonConfigFileName(lc logger.LoggingClient, commonConfigFileName string) string
GetCommonConfigFileName gets the common configuration value from the Variables value (if it exists) or uses passed in value.
func GetConfigDir ¶
func GetConfigDir(lc logger.LoggingClient, configDir string) string
GetConfigDir get the config directory value from a Variables variable value (if it exists) or uses passed in value or default if previous result in blank.
func GetConfigFileName ¶
func GetConfigFileName(lc logger.LoggingClient, configFileName string) string
GetConfigFileName gets the configuration filename value from a Variables variable value (if it exists) or uses passed in value.
func GetProfileDir ¶
func GetProfileDir(lc logger.LoggingClient, profileDir string) string
GetProfileDir get the profile directory value from a Variables variable value (if it exists) or uses passed in value or default if previous result in blank.
func GetRemoteServiceHosts ¶ added in v3.1.0
func GetRemoteServiceHosts(lc logger.LoggingClient, remoteHosts []string) []string
GetRemoteServiceHosts gets the Remote Service host name list from an environment variable (if it exists), if not returns the passed in (default) value
func GetURIRequestTimeout ¶ added in v3.1.0
func GetURIRequestTimeout(lc logger.LoggingClient) time.Duration
GetURIRequestTimeout gets the configuration request timeout value from an environment variable (if it exists) or uses default value.
Types ¶
type StartupInfo ¶
StartupInfo provides the startup timer values which are applied to the StartupTimer created at boot.
func GetStartupInfo ¶
func GetStartupInfo(serviceKey string) StartupInfo
GetStartupInfo gets the Service StartupInfo values from an Variables variable value (if it exists) or uses the default values.
type Variables ¶
type Variables struct {
// contains filtered or unexported fields
}
Variables is a receiver that holds Variables and encapsulates toml.Tree-based configuration field overrides. Assumes "_" embedded in Variables variable key separates sub-structs; e.g. foo_bar_baz might refer to
type foo struct { bar struct { baz string } }
func NewVariables ¶
func NewVariables(lc logger.LoggingClient) *Variables
NewVariables constructor reads/stores os.Environ() for use by Variables receiver methods.
func (*Variables) OverrideConfigMapValues ¶
func (*Variables) OverrideConfigProviderInfo ¶
func (e *Variables) OverrideConfigProviderInfo(configProviderInfo types.ServiceConfig) (types.ServiceConfig, error)
OverrideConfigProviderInfo overrides the Configuration Provider ServiceConfig values from an Variables variable value (if it exists).
func (*Variables) OverrideConfiguration ¶
OverrideConfiguration method replaces values in the configuration for matching Variables variable keys. serviceConfig must be pointer to the service configuration.
func (*Variables) UseRegistry ¶
UseRegistry returns whether the envKeyUseRegistry key is set to true and whether the override was used