tegk / ViperWatchConfigExample

Using Viper to auto reload config data and update values at runtime from yaml file.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Hot Reload of config data at runtime

The following is an example of how to use Viper to automatically reload configuration values at runtime from a YAML file. This is useful if the application cannot effortlessly be restarted when new configuration values are introduced.

References

github.com/spf13/viper , github.com/fsnotify/fsnotify

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT

About

Using Viper to auto reload config data and update values at runtime from yaml file.

License:MIT License


Languages

Language:Go 100.0%