Documentation ¶
Index ¶
- func PrintAllEnv(logger logrus.FieldLogger)
- type EnvVar
- func (v EnvVar) GetBooleanOrDefault(defaultValue bool) bool
- func (v EnvVar) GetIntOrDefault(defaultValue int) int
- func (v EnvVar) GetOrDefaultDuration(defaultValue time.Duration) time.Duration
- func (v EnvVar) GetStringListValueOrDefault(defaultValues ...string) []string
- func (v EnvVar) GetStringOrDefault(defaultValue string) string
- func (v EnvVar) Name() string
- func (v EnvVar) Set(value interface{})
- func (v EnvVar) String() string
- func (v EnvVar) StringValue() string
- type Operation
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type EnvVar ¶
type EnvVar string
EnvVar provides API for access to env variable
func (EnvVar) GetBooleanOrDefault ¶
GetBooleanOrDefault returns env value as string or if env variable have not a value returns default value
func (EnvVar) GetIntOrDefault ¶
GetIntOrDefault returns env value as string or if env variable have not a value returns default value
func (EnvVar) GetOrDefaultDuration ¶
GetOrDefaultDuration returns env value as duration or if env variable have not a value returns default value
func (EnvVar) GetStringListValueOrDefault ¶
GetStringListValueOrDefault returns list of string separated by space or if env variable have not a value returns default value
func (EnvVar) GetStringOrDefault ¶
GetStringOrDefault returns env value as string or if env variable have not a value returns default value
func (EnvVar) StringValue ¶
StringValue returns value of env variable as string
type Operation ¶
type Operation interface { //Run executes operation Run() //Wait waits for operation completed Wait() }
Operation means an object which can be executed
func NewSingleAsyncOperation ¶
func NewSingleAsyncOperation(body func()) Operation
NewSingleAsyncOperation creates an operation which should be invoked once by run period. Can be used in cases where required the last run.