Currently the config file is only processed once, during init, but there are some config values that we may want to change without stopping the app. Debug, for one, comes to mind.
This feature will mean that we can dynamically enable or disable features without needing to halt Ohms.
Implementation Details
Currently our configs are driven by a JSON file that gets unmarshalled into a Configuration struct.
We'll need to switch over to parsing a JSON or yaml file using the viper library. I chose Viper, because it includes the ability to dynamically load config changes to a running app.
Viper Go Configuration Library: https://github.com/spf13/viper
[ ] Add Viper to Ohms.
[ ] Replace current unmarshalling logic with viper unmarshalling to configuration struct.
Description
Currently the config file is only processed once, during init, but there are some config values that we may want to change without stopping the app. Debug, for one, comes to mind. This feature will mean that we can dynamically enable or disable features without needing to halt Ohms.
Implementation Details
Currently our configs are driven by a JSON file that gets unmarshalled into a Configuration struct. We'll need to switch over to parsing a JSON or yaml file using the viper library. I chose Viper, because it includes the ability to dynamically load config changes to a running app. Viper Go Configuration Library: https://github.com/spf13/viper