You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At present, the original yaml file is directly read and unmarshal mode is used for configuration management. If a new configuration item is added, multiple codes will be modified, and if the old configuration is changed, it will be incompatible.
Describe the solution you'd like
Use github.com/spf13/viper to manage configurations. (It uses MIT license, we should be able to import it.)
It supports the use of yaml and JSON format configuration files, or configuration based on environment variables. At the same time, it can also provide etcd based configuration management function.
Improvement Roadmap
First, only change conf.go to unmarshal the configuration file into the structure pointer by viper, which will not destroy the compatibility of the old program.
Then, use Viper to get the configuration file in the newly written code.
Finally, gradually modify the old code to read the configuration code.
The text was updated successfully, but these errors were encountered:
This issue has been marked as stale due to 30 days of inactivity. It will be closed in 2 weeks if no further activity occurs. If this issue is still relevant, please simply write any comment. Even if closed, you can still revive the issue at any time or discuss it on the dev@apisix.apache.org list. Thank you for your contributions.
Feature request
Please describe your feature
At present, the original yaml file is directly read and unmarshal mode is used for configuration management. If a new configuration item is added, multiple codes will be modified, and if the old configuration is changed, it will be incompatible.
Describe the solution you'd like
Use
github.com/spf13/viper
to manage configurations. (It uses MIT license, we should be able to import it.)It supports the use of yaml and JSON format configuration files, or configuration based on environment variables. At the same time, it can also provide etcd based configuration management function.
Improvement Roadmap
First, only change
conf.go
to unmarshal the configuration file into the structure pointer by viper, which will not destroy the compatibility of the old program.Then, use Viper to get the configuration file in the newly written code.
Finally, gradually modify the old code to read the configuration code.
The text was updated successfully, but these errors were encountered: