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

event可以监控配置中心的namespace吗? #65

Closed
sundayslove opened this issue Apr 19, 2019 · 3 comments
Closed

event可以监控配置中心的namespace吗? #65

sundayslove opened this issue Apr 19, 2019 · 3 comments

Comments

@sundayslove
Copy link

sundayslove commented Apr 19, 2019

go-archaius/core/core.go

Lines 68 to 73 in 96fc4ad

type Event struct {
EventSource string
EventType string
Key string
Value interface{}
}

sourceName, ok := configMgr.ConfigurationMap[event.Key]

从这两处看event的key貌似就是配置信息的key。

event有办法做到监控整个文件吗?比如配置中心中有个namespace叫test,能注册针对这个test的event吗,而不仅仅是针对其中的某个键值对。

@sundayslove
Copy link
Author

问题补充:go-archaius不支持apollo多namespace吗?

看Client结构体是初始化时就直接确定namespace的值了。
https://github.com/go-chassis/go-chassis-config/blob/41b5bee9c93bb0a0b349d20da1d2d581485fe430/apollo/apollo_client.go#L15-L23

@tianxiaoliang
Copy link
Member

如果有兴趣可以贡献apollo部分的文档和源码,谢谢

@sundayslove
Copy link
Author

好的

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants