Documentation ¶
Index ¶
Constants ¶
View Source
const DefaultHoardConfigFileName = "hoard.conf"
View Source
const DefaultJSONConfigEnvironmentVariable = "HOARD_JSON_CONFIG"
View Source
const STDINFileIdentifier = "-"
Variables ¶
This section is empty.
Functions ¶
func Cascade ¶
func Cascade(logWriter io.Writer, shortCircuit bool, sources ...ConfigProvider) *configSource
func Environment ¶
func Environment(key string) *configSource
Source from a single environment variable with config embedded in JSON
Types ¶
type ConfigProvider ¶
type ConfigProvider interface { // Description of where this provider sources its config from From() string // Get the config possibly overriding values passed in from baseConfig Get(baseConfig *config.HoardConfig) (*config.HoardConfig, error) // Return a copy of the provider that does nothing if skip is true SetSkip(skip bool) ConfigProvider // Whether to skip this provider Skip() bool }
Click to show internal directories.
Click to hide internal directories.