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 // FlagSet is the flag set from which to load flags in config // default value is flag.CommandLine FlagSet *flag.FlagSet // Prefix is the prefix to append before each flag to be added in the konfig.Store Prefix string // Replacer is a replacer to apply on flags to be added in the konfig.Store Replacer nstrings.Replacer // MaxRetry is the maximum number of times to retry MaxRetry int // RetryDelay is the delay between each retry RetryDelay time.Duration }
Config is the config for the Flag Loader
type Loader ¶
type Loader struct {
// contains filtered or unexported fields
}
Loader is a loader for command line flags
func (*Loader) Load ¶
Load implements konfig.Loader interface, it loads flags from the FlagSet given in config into the konfig.Store
func (*Loader) MaxRetry ¶
MaxRetry implements the konfig.Loader interface, it returns the max number of times a Load can be retried if it fails
func (*Loader) RetryDelay ¶
RetryDelay implements the konfig.Loader interface, is the delay between each 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.