micro/config
Asim Aslam 1d311ab457
Embedded NATS Broker (#1110)
* if the address is produced by a default route don't hash it

* embedded nats

* fix url parsing

* don't override help

* add ready flag
2020-01-14 13:23:16 +00:00
..
cmd Embedded NATS Broker (#1110) 2020-01-14 13:23:16 +00:00
encoder add config 2019-05-30 23:11:13 +01:00
loader replace map with list 2019-12-05 19:29:48 +08:00
options linting fixes 2019-12-04 00:22:02 +03:00
reader config/reader.Values add Set for specific path merge (#1099) 2020-01-11 20:50:09 +00:00
source reorder 2019-12-23 08:49:53 +00:00
config.go add config 2019-05-30 23:11:13 +01:00
default_test.go Removed filewatch counter test. 2019-08-21 11:26:41 +01:00
default.go config/reader.Values add Set for specific path merge (#1099) 2020-01-11 20:50:09 +00:00
options.go add config 2019-05-30 23:11:13 +01:00
README.md remove some readmes 2019-07-04 11:15:54 +01:00
value.go add config 2019-05-30 23:11:13 +01:00

Config GoDoc

Config is a pluggable dynamic config package

Most config in applications are statically configured or include complex logic to load from multiple sources. Go Config makes this easy, pluggable and mergeable. You'll never have to deal with config in the same way again.

Features

  • Dynamic Loading - Load configuration from multiple source as and when needed. Go Config manages watching config sources in the background and automatically merges and updates an in memory view.

  • Pluggable Sources - Choose from any number of sources to load and merge config. The backend source is abstracted away into a standard format consumed internally and decoded via encoders. Sources can be env vars, flags, file, etcd, k8s configmap, etc.

  • Mergeable Config - If you specify multiple sources of config, regardless of format, they will be merged and presented in a single view. This massively simplifies priority order loading and changes based on environment.

  • Observe Changes - Optionally watch the config for changes to specific values. Hot reload your app using Go Config's watcher. You don't have to handle ad-hoc hup reloading or whatever else, just keep reading the config and watch for changes if you need to be notified.

  • Sane Defaults - In case config loads badly or is completely wiped away for some unknown reason, you can specify fallback values when accessing any config values directly. This ensures you'll always be reading some sane default in the event of a problem.

Getting Started

For detailed information or architecture, installation and general usage see the docs