package
Version:
v0.0.0-...-ef924d7
Opens a new window with list of versions in this module.
Published: Sep 12, 2016
License: MIT
Opens a new window with license information.
Imports: 9
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
Package config implements logic to load dynamic configuration from various sources
It also defines environment specific configuraton (dev, prod, ...)
Adapters returns the list of registered adapters
func NewStore(configStoreURI string) (store.Store, error)
NewStore returns a loaded config store defined by the ConfigStorage env
func Register(name string, adapter store.Adapter)
Register makes a store adapter available by the provided name.
If an adapter is registered twice or if an adapter is nil, it will panic.
ValueOf extracts the environment variable name given or the plain string given
e.g. foo -> foo
$DATABASE_URL -> http://foo.bar:8083
type Config struct {
Log Log `json:"log"`
Stats Stats `json:"stats"`
App interface{} `json:"app"`
}
Config defines the app config
Log contains all log-related configuration
type Stats struct {
On bool `json:"on"`
Adapter string `json:"adapter"`
Config map[string]string `json:"config"`
}
Stats contains all stats-related configuration
Source Files
¶
Directories
¶
|
|
etcd
Package etcd reads configuration from etcd
|
Package etcd reads configuration from etcd |
file
Package file reads configuration from a JSON file
|
Package file reads configuration from a JSON file |
Click to show internal directories.
Click to hide internal directories.