Documentation
¶
Overview ¶
Package config is an interface for dynamic configuration.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Configurator ¶
type Configurator interface {
Load() error // Load config sources
Scan(val interface{}) error // Scan to val
Value(key string) value.Value // Value get values through key
Watch(key string, cb Callback) error // Watch key change
Close() error // Close stop the config loader/watcher
}
Configurator is an interface abstraction for dynamic configuration
type Option ¶
type Option func(o *Options)
func WithInterval ¶
WithInterval sets watch interval
func WithSource ¶
WithSource appends a source to list of sources, the latter has higher priority.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package reader parses change sets and provides config values
|
Package reader parses change sets and provides config values |
|
Package source is the interface for sources
|
Package source is the interface for sources |
|
file
Package file is a file source.
|
Package file is a file source. |
Click to show internal directories.
Click to hide internal directories.