Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: migrate to viper library for config manage #1931

Closed
bzp2010 opened this issue Jun 4, 2021 · 1 comment
Closed

feat: migrate to viper library for config manage #1931

bzp2010 opened this issue Jun 4, 2021 · 1 comment
Labels

Comments

@bzp2010
Copy link
Contributor

bzp2010 commented Jun 4, 2021

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

  1. 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.

  2. Then, use Viper to get the configuration file in the newly written code.

  3. Finally, gradually modify the old code to read the configuration code.

@github-actions
Copy link

github-actions bot commented Nov 1, 2021

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.

@github-actions github-actions bot added the stale label Nov 1, 2021
@bzp2010 bzp2010 closed this as completed Nov 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant