1
0
mirror of https://github.com/go-micro/go-micro.git synced 2024-11-30 08:06:40 +02:00
go-micro/config
Niek den Breeje 9a77c06b44
Move from micro/cli/v2 to urfave/cli/v2 (#2224)
* Use urfave/cli/v2 instead of micro/cli/v2

Wherever possible we may want to eliminate the use of github.com/micro
imports.

* Fix broken cli test
2021-08-31 09:05:08 +01:00
..
encoder v3 (#2104) 2021-01-20 13:54:31 +00:00
loader loader: avoid overwriting values if error happens (#2204) 2021-08-11 13:33:58 +01:00
reader v3 (#2104) 2021-01-20 13:54:31 +00:00
secrets v3 (#2104) 2021-01-20 13:54:31 +00:00
source Move from micro/cli/v2 to urfave/cli/v2 (#2224) 2021-08-31 09:05:08 +01:00
config.go v3 (#2104) 2021-01-20 13:54:31 +00:00
default_test.go improve code quality (#2128) 2021-02-25 08:30:35 +00:00
default.go fix missing error (#2189) 2021-06-30 10:13:05 +01:00
options.go v3 (#2104) 2021-01-20 13:54:31 +00:00
README.md remove some readmes 2019-07-04 11:15:54 +01:00
value.go v3 (#2104) 2021-01-20 13:54:31 +00: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