Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // Name is the name of the loader Name string // StopOnFailure tells whether a failure to load configs should closed the config and all registered closers StopOnFailure bool // Regexp will load the environment variable if it matches the given regexp Regexp string // Vars will load vars only present in the vars slice Vars []string // Prefix will add a prefix to the environment variables when adding them in the config store Prefix string // Replacer is used to replace chars in env vars keys Replacer nstrings.Replacer // MaxRetry is the maximum number of time the load method can be retried when it fails MaxRetry int // RetryDelay is the time betweel each retry RetryDelay time.Duration // SliceSeparator contains separator for values like `item1,item2,item3`. // Such values will be loaded as string slice if separator is not empty. SliceSeparator string }
Config is the config a an EnvLoader
type Loader ¶
type Loader struct {
// contains filtered or unexported fields
}
Loader is the structure representing the environment loader
func (*Loader) Load ¶
Load implements konfig.Loader, it loads environment variables into the konfig.Store based on config passed to the loader
func (*Loader) RetryDelay ¶
RetryDelay returns the delay between each load retry
func (*Loader) StopOnFailure ¶
StopOnFailure returns whether a load failure should stop the config and the registered closers
Click to show internal directories.
Click to hide internal directories.