package
0.0.0-20191223100755-0bfeb1b27b81
Repository: https://github.com/supereagle/go-example.git
Documentation: pkg.go.dev
# README
Config Reader
Config is an important part of an application. Most applications with configuration needs to first read config to initialize the instance before really start work.
This example illustrates how to read config for an application from following 4 ways:
- Environment Variables: The environment variables must be set before start the application. If the application runs in another place, these environment variables must be set again. Some container orchestration tools such Kubernetes and Compose can help to set the environment variables when schedule the application.
- ETCD: ETCD is a distributed reliable key-value store, which can be used as a config center. It can keep high consistent and available when works as cluster.
- JSON file
- YAML file
# Constants
Config source supported.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author