-
Notifications
You must be signed in to change notification settings - Fork 931
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
Config center feature implement for setting the zookeeper as config center to refresh consumerConfig & providerConfig when dubbogo starting. #99
Conversation
how about make a conference to introduce it to reviewers when there is a big change like this? |
1.Code in config folder have refactored for supporting config_center to refresh the consumerConfig or providerConfig when dubbogo starting. The core code is in base_config.go. |
I write the main work in this pr above . May can help you review the code. |
Codecov Report
@@ Coverage Diff @@
## master #99 +/- ##
==========================================
+ Coverage 63.11% 67.27% +4.16%
==========================================
Files 54 67 +13
Lines 3652 4086 +434
==========================================
+ Hits 2305 2749 +444
+ Misses 1120 1052 -68
- Partials 227 285 +58
Continue to review full report at Codecov.
|
if conLen == 0 { | ||
panic("conMap is nil") | ||
} | ||
config.Load() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why delete check condition?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
config.Load方法已经改为无返回值。之前是返回加载成功的配置数,与yincheng讨论后觉得没有必要,且不优雅。
- id: "hangzhouzk" | ||
type: "zookeeper" | ||
"hangzhouzk": | ||
protocol: "zookeeper" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
type -> protocol? Is zookeeper a protocol?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
是的,这里与java的叫法保持一致了。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
是的,这里与java的叫法保持一致了。
@@ -30,7 +30,7 @@ import ( | |||
"github.com/apache/dubbo-go/common/logger" | |||
) | |||
|
|||
type ZkClientContainer interface { | |||
type zkClientFacade interface { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
which change its name?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
container叫法感觉别扭,感觉这种实现方式,类似于设计模式之门面模式。
return instance | ||
} | ||
|
||
//func (env *Environment) SetConfigCenterFirst() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not remove comment?
// env.configCenterFirst = true | ||
//} | ||
|
||
//func (env *Environment) ConfigCenterFirst() bool { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里我估计后面添加新的配置级别,就会要加上,所以没有直接去掉,先注释掉了。先不删吧
I have added some review comments on codes. I also want to ask when this pr will be merged into master? |
I do not know. So big pr. |
What this PR does:
New feature implement for config center, config refresh from config center when dubbogo start.
Now just have a zookeeper implement for config center.
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
You can do a example in examples/dubbo/with-configcenter-go-server/
Does this PR introduce a user-facing change?: