Documentation ¶
Index ¶
- Constants
- Variables
- func GetStringEnvWithDefault(name, defaultValue string) string
- func LoadEnvVar(name string, defaultValue string, canBeEmpty bool) string
- func LoadFloatEnvVar(name string, defaultValue float64, canBeEmpty bool) float64
- func LoadIntEnvVar(name string, defaultValue int, canBeEmpty bool) int
Constants ¶
View Source
const ( EnvCycloneServerPort = "ENV_CYCLONE_SERVER_PORT" EnvCycloneServerHost = "ENV_CYCLONE_SERVER_HOST" EnvKubeHost = "ENV_KUBE_HOST" EnvKubeConfig = "ENV_KUBE_CONFIG" EnvLogLevel = "ENV_LOG_LEVEL" DefaultCycloneServerPort int = 7099 DefaultCycloneServerHost = "0.0.0.0" DefaultLogLevel = "info" )
Variables ¶
Functions ¶
func GetStringEnvWithDefault ¶
GetStringEnvWithDefault retrieves the value of the environment variable named by the key. If the variable is present in the environment the value is returned. Otherwise the default is returned.
func LoadEnvVar ¶
LoadEnvVar retrieves the value of 'name' frome environment. If canBeEmpty is false and the value of the 'name' is empty, os will exit.
func LoadFloatEnvVar ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.