-
Notifications
You must be signed in to change notification settings - Fork 50
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
与viper结合时,remote部分的agollo没办法停止 #52
Comments
确实有这个问题 你的需求是不是只需要启动时读取一次,并不需要持续监听配置 如果是在Watch后,需要去关闭agollo 就不太好处理,实例被隐藏在viper后面 |
也不是,我也需要持续监听配置。只是在主程序退出时希望agollo也可以stop,毕竟有个goroutine在那里。我看remote那里所有的agollo都放在 remote.go
但是 |
主进程退出后,这些监听的goroutine也会消亡,其实不用太在意 这样也考虑过,是可以这么做。longPoll最坏情况下,对应的那个agollo实例,90秒后也会退出,也还好。 |
嗯,我不是太清楚主进程退出后监听goroutine相关的资源会不会被正常回收,stopCh还好,longPoll里面涉及到网络了不是太安心。viper接口里增加Close就好了,我先关issue吧,谢谢您抽空解答。 |
viper-remote部分会在第一次读配置时new一个agollo对象,然后启动notification监听。但是这个agollo目前好像没有停止的方式
The text was updated successfully, but these errors were encountered: