-
-
Notifications
You must be signed in to change notification settings - Fork 188
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
支持动态添加新的namespace吗 #259
Comments
我自己二开实现了该特性,需要的朋友可以移步:https://github.com/qshuai/agollo#%E5%8A%A8%E6%80%81namespace%E7%89%B9%E6%80%A7 |
如果有可能,可以提交 pr。 |
你的实现方式是这样吗: 调整成这样是不是比较好: 按照目前的代码结构,只需要有个内置的change监听,设置调用下SetCurrentApolloConfig就可以了 |
嗯呢,不错的想法! |
不过我好奇应用场景是什么,按说新增配置不应该都是需要提前适配代码的吗,这就需要重新部署或者重新启动的。 |
一个可能但不一定合理的场景:一个类目相关的服务,提供类目相关配置的查询能力,而类目是可以横向扩展的;也就是说在服务启动的时候,并不知道有多少个类目需要配置。为了实现无需重启服务就能提供这样能力的诉求,就衍生了这么一个功能。 一开始我并不同意业务方的诉求,其实这个诉求可以通过如下方式满足:搭建一个类目的后台管理,再加上一个持久化存储,程序实时查询数据库的数据即可。但是业务方看中了apollo配置中心已经存在的灰度发布、审核流程、变更历史查询等能力,不想重复建设,把配置中心当做数据库在使用了。所以~ |
确实不太合理,当成数据库用了 |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
我想实现运行时动态添加namespace,然后可以在cache中查询到新添加namespace的配置数据,现在的api可以做到么?
The text was updated successfully, but these errors were encountered: