Documentation ¶
Index ¶
- func GetConfDir(lc logger.LoggingClient, configDir string) string
- func GetConfigFileName(lc logger.LoggingClient, configFileName string) string
- func GetProfileDir(lc logger.LoggingClient, profileDir string) string
- type StartupInfo
- type Variables
- func (_ *Variables) GetRegistryProviderInfoOverride(lc logger.LoggingClient) string
- func (_ *Variables) OverrideConfigProviderInfo(lc logger.LoggingClient, configProviderInfo types.ServiceConfig) (types.ServiceConfig, error)
- func (e *Variables) OverrideConfiguration(lc logger.LoggingClient, serviceConfig interface{}) (int, error)
- func (e *Variables) UseRegistry() bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetConfDir ¶
func GetConfDir(lc logger.LoggingClient, configDir string) string
GetConfDir get the config directory value from an 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 an 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 an Variables variable value (if it exists) or uses passed in value or default if previous result in blank.
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 receiver that holds Variables variables and encapsulates toml.Tree-based configuration field overrides. Assumes "_" embedded in Variables variable key separates substructs; e.g. foo_bar_baz might refer to
type foo struct { bar struct { baz string } }
func NewVariables ¶
func NewVariables() *Variables
NewEnvironment constructor reads/stores os.Environ() for use by Variables receiver methods.
func (*Variables) GetRegistryProviderInfoOverride ¶
func (_ *Variables) GetRegistryProviderInfoOverride(lc logger.LoggingClient) string
TODO: Remove this func for release V2.0.0 This is for backwards compatibility with Fuji Device Services. If --registry=<url> is used then we must use the <url> for the configuration provider. GetRegistryProviderInfoOverride get the overrides for Registry Provider Config values from an Variables variable value (if it exists).
func (*Variables) OverrideConfigProviderInfo ¶
func (_ *Variables) OverrideConfigProviderInfo( lc logger.LoggingClient, configProviderInfo types.ServiceConfig) (types.ServiceConfig, error)
OverrideConfigProviderInfo overrides the Configuration Provider ServiceConfig values from an Variables variable value (if it exists).
func (*Variables) OverrideConfiguration ¶
func (e *Variables) OverrideConfiguration(lc logger.LoggingClient, serviceConfig interface{}) (int, error)
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 envKeyRegistryUrl key is set TODO: remove this func for release v2.0.0 when envKeyRegistryUrl is removed