You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2020/06/06 15:28:43 UTC

[GitHub] [dubbo-go] zouyx opened a new pull request #589: Mod: update the comments in registy directory

zouyx opened a new pull request #589:
URL: https://github.com/apache/dubbo-go/pull/589


   <!--  Thanks for sending a pull request! 
   -->
   
   **What this PR does**:
   
   * update the comments in registy directory
   
   **Which issue(s) this PR fixes**:
   <!--
   *Automatically closes linked issue when PR is merged.
   Usage: `Fixes #<issue number>`, or `Fixes (paste link of issue)`.
   _If PR is about `failing-tests or flakes`, please post the related issues/tests in a comment and do not use `Fixes`_*
   -->
   Fixes #
   
   **Special notes for your reviewer**:
   
   **Does this PR introduce a user-facing change?**:
   <!--
   If no, just write "NONE" in the release-note block below.
   If yes, a release note is required:
   Enter your extended release note in the block below. If the PR requires additional action from users switching to the new release, include the string "action required".
   -->
   ```release-note
   
   ```


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go] codecov-commenter edited a comment on pull request #589: Mod: update the comments in registy directory

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #589:
URL: https://github.com/apache/dubbo-go/pull/589#issuecomment-640154457


   # [Codecov](https://codecov.io/gh/apache/dubbo-go/pull/589?src=pr&el=h1) Report
   > Merging [#589](https://codecov.io/gh/apache/dubbo-go/pull/589?src=pr&el=desc) into [develop](https://codecov.io/gh/apache/dubbo-go/commit/106040d53d8e0f799615fd3f4796fb2c9008d9fc&el=desc) will **increase** coverage by `0.47%`.
   > The diff coverage is `50.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/dubbo-go/pull/589/graphs/tree.svg?width=650&height=150&src=pr&token=dcPE6RyFAL)](https://codecov.io/gh/apache/dubbo-go/pull/589?src=pr&el=tree)
   
   ```diff
   @@             Coverage Diff             @@
   ##           develop     #589      +/-   ##
   ===========================================
   + Coverage    66.80%   67.28%   +0.47%     
   ===========================================
     Files          185      188       +3     
     Lines         9749     9854     +105     
   ===========================================
   + Hits          6513     6630     +117     
   + Misses        2600     2573      -27     
   - Partials       636      651      +15     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/dubbo-go/pull/589?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [config\_center/configuration\_listener.go](https://codecov.io/gh/apache/dubbo-go/pull/589/diff?src=pr&el=tree#diff-Y29uZmlnX2NlbnRlci9jb25maWd1cmF0aW9uX2xpc3RlbmVyLmdv) | `0.00% <ø> (ø)` | |
   | [registry/consul/listener.go](https://codecov.io/gh/apache/dubbo-go/pull/589/diff?src=pr&el=tree#diff-cmVnaXN0cnkvY29uc3VsL2xpc3RlbmVyLmdv) | `81.25% <ø> (ø)` | |
   | [registry/consul/registry.go](https://codecov.io/gh/apache/dubbo-go/pull/589/diff?src=pr&el=tree#diff-cmVnaXN0cnkvY29uc3VsL3JlZ2lzdHJ5Lmdv) | `43.83% <0.00%> (ø)` | |
   | [registry/directory/directory.go](https://codecov.io/gh/apache/dubbo-go/pull/589/diff?src=pr&el=tree#diff-cmVnaXN0cnkvZGlyZWN0b3J5L2RpcmVjdG9yeS5nbw==) | `80.11% <ø> (ø)` | |
   | [registry/etcdv3/listener.go](https://codecov.io/gh/apache/dubbo-go/pull/589/diff?src=pr&el=tree#diff-cmVnaXN0cnkvZXRjZHYzL2xpc3RlbmVyLmdv) | `72.34% <ø> (ø)` | |
   | [registry/etcdv3/registry.go](https://codecov.io/gh/apache/dubbo-go/pull/589/diff?src=pr&el=tree#diff-cmVnaXN0cnkvZXRjZHYzL3JlZ2lzdHJ5Lmdv) | `73.13% <ø> (ø)` | |
   | [registry/kubernetes/listener.go](https://codecov.io/gh/apache/dubbo-go/pull/589/diff?src=pr&el=tree#diff-cmVnaXN0cnkva3ViZXJuZXRlcy9saXN0ZW5lci5nbw==) | `72.34% <ø> (ø)` | |
   | [registry/kubernetes/registry.go](https://codecov.io/gh/apache/dubbo-go/pull/589/diff?src=pr&el=tree#diff-cmVnaXN0cnkva3ViZXJuZXRlcy9yZWdpc3RyeS5nbw==) | `67.30% <ø> (+9.61%)` | :arrow_up: |
   | [registry/nacos/listener.go](https://codecov.io/gh/apache/dubbo-go/pull/589/diff?src=pr&el=tree#diff-cmVnaXN0cnkvbmFjb3MvbGlzdGVuZXIuZ28=) | `80.00% <ø> (ø)` | |
   | [registry/nacos/registry.go](https://codecov.io/gh/apache/dubbo-go/pull/589/diff?src=pr&el=tree#diff-cmVnaXN0cnkvbmFjb3MvcmVnaXN0cnkuZ28=) | `58.42% <ø> (ø)` | |
   | ... and [31 more](https://codecov.io/gh/apache/dubbo-go/pull/589/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo-go/pull/589?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/dubbo-go/pull/589?src=pr&el=footer). Last update [106040d...32df9e8](https://codecov.io/gh/apache/dubbo-go/pull/589?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go] AlexStocks commented on a change in pull request #589: Mod: update the comments in registy directory

Posted by GitBox <gi...@apache.org>.
AlexStocks commented on a change in pull request #589:
URL: https://github.com/apache/dubbo-go/pull/589#discussion_r436446891



##########
File path: registry/protocol/protocol.go
##########
@@ -411,6 +416,8 @@ func newProviderConfigurationListener(overrideListeners *sync.Map) *providerConf
 	return listener
 }
 
+// Process is Listener callback method. Listener gets notified by this method once there's any change happens on the config

Review comment:
       so long

##########
File path: registry/registry.go
##########
@@ -45,13 +45,21 @@ type Registry interface {
 	Subscribe(*common.URL, NotifyListener)
 }
 
-// NotifyListener ...
+// NotifyListener is used for triggered when a service change notification is received.
 type NotifyListener interface {
+	// Notify needs to support the contract: <br>

Review comment:
       so lang.

##########
File path: config_center/configuration_listener.go
##########
@@ -27,6 +27,8 @@ import (
 
 // ConfigurationListener for changing listener's event
 type ConfigurationListener interface {
+	// Process is Listener callback method. Listener gets notified by this method once there's any change happens on the config

Review comment:
       so long.

##########
File path: registry/protocol/protocol.go
##########
@@ -435,6 +442,8 @@ func newServiceConfigurationListener(overrideListener *overrideSubscribeListener
 	return listener
 }
 
+// Process is Listener callback method. Listener gets notified by this method once there's any change happens on the config

Review comment:
       so long.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go] zouyx commented on a change in pull request #589: Mod: update the comments in registy directory

Posted by GitBox <gi...@apache.org>.
zouyx commented on a change in pull request #589:
URL: https://github.com/apache/dubbo-go/pull/589#discussion_r442265401



##########
File path: registry/consul/registry.go
##########
@@ -95,6 +95,7 @@ func (r *consulRegistry) register(url common.URL) error {
 	return r.client.Agent().ServiceRegister(service)
 }
 
+// Unregister service from consul registry center

Review comment:
       I think `Unregister service from consul registry center` is a full sentence.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go] codecov-commenter commented on pull request #589: Mod: update the comments in registy directory

Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on pull request #589:
URL: https://github.com/apache/dubbo-go/pull/589#issuecomment-640154457


   # [Codecov](https://codecov.io/gh/apache/dubbo-go/pull/589?src=pr&el=h1) Report
   > Merging [#589](https://codecov.io/gh/apache/dubbo-go/pull/589?src=pr&el=desc) into [develop](https://codecov.io/gh/apache/dubbo-go/commit/106040d53d8e0f799615fd3f4796fb2c9008d9fc&el=desc) will **increase** coverage by `0.57%`.
   > The diff coverage is `50.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/dubbo-go/pull/589/graphs/tree.svg?width=650&height=150&src=pr&token=dcPE6RyFAL)](https://codecov.io/gh/apache/dubbo-go/pull/589?src=pr&el=tree)
   
   ```diff
   @@             Coverage Diff             @@
   ##           develop     #589      +/-   ##
   ===========================================
   + Coverage    66.80%   67.37%   +0.57%     
   ===========================================
     Files          185      188       +3     
     Lines         9749     9849     +100     
   ===========================================
   + Hits          6513     6636     +123     
   + Misses        2600     2559      -41     
   - Partials       636      654      +18     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/dubbo-go/pull/589?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [config\_center/configuration\_listener.go](https://codecov.io/gh/apache/dubbo-go/pull/589/diff?src=pr&el=tree#diff-Y29uZmlnX2NlbnRlci9jb25maWd1cmF0aW9uX2xpc3RlbmVyLmdv) | `0.00% <ø> (ø)` | |
   | [registry/consul/listener.go](https://codecov.io/gh/apache/dubbo-go/pull/589/diff?src=pr&el=tree#diff-cmVnaXN0cnkvY29uc3VsL2xpc3RlbmVyLmdv) | `81.25% <ø> (ø)` | |
   | [registry/consul/registry.go](https://codecov.io/gh/apache/dubbo-go/pull/589/diff?src=pr&el=tree#diff-cmVnaXN0cnkvY29uc3VsL3JlZ2lzdHJ5Lmdv) | `43.83% <0.00%> (ø)` | |
   | [registry/directory/directory.go](https://codecov.io/gh/apache/dubbo-go/pull/589/diff?src=pr&el=tree#diff-cmVnaXN0cnkvZGlyZWN0b3J5L2RpcmVjdG9yeS5nbw==) | `80.11% <ø> (ø)` | |
   | [registry/etcdv3/listener.go](https://codecov.io/gh/apache/dubbo-go/pull/589/diff?src=pr&el=tree#diff-cmVnaXN0cnkvZXRjZHYzL2xpc3RlbmVyLmdv) | `72.34% <ø> (ø)` | |
   | [registry/etcdv3/registry.go](https://codecov.io/gh/apache/dubbo-go/pull/589/diff?src=pr&el=tree#diff-cmVnaXN0cnkvZXRjZHYzL3JlZ2lzdHJ5Lmdv) | `73.13% <ø> (ø)` | |
   | [registry/kubernetes/listener.go](https://codecov.io/gh/apache/dubbo-go/pull/589/diff?src=pr&el=tree#diff-cmVnaXN0cnkva3ViZXJuZXRlcy9saXN0ZW5lci5nbw==) | `72.34% <ø> (ø)` | |
   | [registry/kubernetes/registry.go](https://codecov.io/gh/apache/dubbo-go/pull/589/diff?src=pr&el=tree#diff-cmVnaXN0cnkva3ViZXJuZXRlcy9yZWdpc3RyeS5nbw==) | `67.30% <ø> (+9.61%)` | :arrow_up: |
   | [registry/nacos/listener.go](https://codecov.io/gh/apache/dubbo-go/pull/589/diff?src=pr&el=tree#diff-cmVnaXN0cnkvbmFjb3MvbGlzdGVuZXIuZ28=) | `80.00% <ø> (ø)` | |
   | [registry/nacos/registry.go](https://codecov.io/gh/apache/dubbo-go/pull/589/diff?src=pr&el=tree#diff-cmVnaXN0cnkvbmFjb3MvcmVnaXN0cnkuZ28=) | `58.42% <ø> (ø)` | |
   | ... and [27 more](https://codecov.io/gh/apache/dubbo-go/pull/589/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo-go/pull/589?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/dubbo-go/pull/589?src=pr&el=footer). Last update [106040d...cebc94a](https://codecov.io/gh/apache/dubbo-go/pull/589?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go] AlexStocks commented on a change in pull request #589: Mod: update the comments in registy directory

Posted by GitBox <gi...@apache.org>.
AlexStocks commented on a change in pull request #589:
URL: https://github.com/apache/dubbo-go/pull/589#discussion_r439743605



##########
File path: registry/zookeeper/registry.go
##########
@@ -141,35 +142,43 @@ func (r *zkRegistry) InitListeners() {
 	r.dataListener = newDataListener
 }
 
+// CreatePath create the path in the registry center of zookeeper
 func (r *zkRegistry) CreatePath(path string) error {
 	return r.ZkClient().Create(path)
 }
 
+// DoRegister actually do the register job in the registry center of zookeeper
 func (r *zkRegistry) DoRegister(root string, node string) error {
 	return r.registerTempZookeeperNode(root, node)
 }
 
+// DoSubscribe actually subscribe the provider URL
 func (r *zkRegistry) DoSubscribe(conf *common.URL) (registry.Listener, error) {
 	return r.getListener(conf)
 }
 
+// CloseAndNilClient closes listeners and clear client
 func (r *zkRegistry) CloseAndNilClient() {
 	r.client.Close()
 	r.client = nil
 }
 
+// ZkClient gets zookeeper client

Review comment:
        a `nolint` is enough.

##########
File path: registry/nacos/listener.go
##########
@@ -212,6 +214,7 @@ func (nl *nacosListener) Next() (*registry.ServiceEvent, error) {
 	}
 }
 
+// Close nacos registry center

Review comment:
        a `nolint` is enough.

##########
File path: registry/registry.go
##########
@@ -45,13 +45,16 @@ type Registry interface {
 	Subscribe(*common.URL, NotifyListener)
 }
 
-// NotifyListener ...
+// NotifyListener is used for triggered when a service change notification is received.

Review comment:
        a `nolint` is enough.

##########
File path: registry/zookeeper/registry.go
##########
@@ -141,35 +142,43 @@ func (r *zkRegistry) InitListeners() {
 	r.dataListener = newDataListener
 }
 
+// CreatePath create the path in the registry center of zookeeper
 func (r *zkRegistry) CreatePath(path string) error {
 	return r.ZkClient().Create(path)
 }
 
+// DoRegister actually do the register job in the registry center of zookeeper
 func (r *zkRegistry) DoRegister(root string, node string) error {
 	return r.registerTempZookeeperNode(root, node)
 }
 
+// DoSubscribe actually subscribe the provider URL
 func (r *zkRegistry) DoSubscribe(conf *common.URL) (registry.Listener, error) {
 	return r.getListener(conf)
 }
 
+// CloseAndNilClient closes listeners and clear client
 func (r *zkRegistry) CloseAndNilClient() {
 	r.client.Close()
 	r.client = nil
 }
 
+// ZkClient gets zookeeper client
 func (r *zkRegistry) ZkClient() *zookeeper.ZookeeperClient {
 	return r.client
 }
 
+// SetZkClient sets zookeeper client
 func (r *zkRegistry) SetZkClient(client *zookeeper.ZookeeperClient) {
 	r.client = client
 }
 
+// ZkClientLock gets zookeeper registry control lock
 func (r *zkRegistry) ZkClientLock() *sync.Mutex {
 	return &r.cltLock
 }
 
+// CloseListener closes listeners

Review comment:
        a `nolint` is enough.

##########
File path: registry/zookeeper/registry.go
##########
@@ -141,35 +142,43 @@ func (r *zkRegistry) InitListeners() {
 	r.dataListener = newDataListener
 }
 
+// CreatePath create the path in the registry center of zookeeper
 func (r *zkRegistry) CreatePath(path string) error {
 	return r.ZkClient().Create(path)
 }
 
+// DoRegister actually do the register job in the registry center of zookeeper
 func (r *zkRegistry) DoRegister(root string, node string) error {
 	return r.registerTempZookeeperNode(root, node)
 }
 
+// DoSubscribe actually subscribe the provider URL
 func (r *zkRegistry) DoSubscribe(conf *common.URL) (registry.Listener, error) {
 	return r.getListener(conf)
 }
 
+// CloseAndNilClient closes listeners and clear client
 func (r *zkRegistry) CloseAndNilClient() {
 	r.client.Close()
 	r.client = nil
 }
 
+// ZkClient gets zookeeper client
 func (r *zkRegistry) ZkClient() *zookeeper.ZookeeperClient {
 	return r.client
 }
 
+// SetZkClient sets zookeeper client
 func (r *zkRegistry) SetZkClient(client *zookeeper.ZookeeperClient) {
 	r.client = client
 }
 
+// ZkClientLock gets zookeeper registry control lock

Review comment:
        a `nolint` is enough.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go] codecov-commenter edited a comment on pull request #589: Mod: update the comments in registy directory

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #589:
URL: https://github.com/apache/dubbo-go/pull/589#issuecomment-640154457


   # [Codecov](https://codecov.io/gh/apache/dubbo-go/pull/589?src=pr&el=h1) Report
   > Merging [#589](https://codecov.io/gh/apache/dubbo-go/pull/589?src=pr&el=desc) into [develop](https://codecov.io/gh/apache/dubbo-go/commit/106040d53d8e0f799615fd3f4796fb2c9008d9fc&el=desc) will **increase** coverage by `0.66%`.
   > The diff coverage is `50.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/dubbo-go/pull/589/graphs/tree.svg?width=650&height=150&src=pr&token=dcPE6RyFAL)](https://codecov.io/gh/apache/dubbo-go/pull/589?src=pr&el=tree)
   
   ```diff
   @@             Coverage Diff             @@
   ##           develop     #589      +/-   ##
   ===========================================
   + Coverage    66.80%   67.46%   +0.66%     
   ===========================================
     Files          185      188       +3     
     Lines         9749     9852     +103     
   ===========================================
   + Hits          6513     6647     +134     
   + Misses        2600     2552      -48     
   - Partials       636      653      +17     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/dubbo-go/pull/589?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [config\_center/configuration\_listener.go](https://codecov.io/gh/apache/dubbo-go/pull/589/diff?src=pr&el=tree#diff-Y29uZmlnX2NlbnRlci9jb25maWd1cmF0aW9uX2xpc3RlbmVyLmdv) | `0.00% <ø> (ø)` | |
   | [registry/consul/listener.go](https://codecov.io/gh/apache/dubbo-go/pull/589/diff?src=pr&el=tree#diff-cmVnaXN0cnkvY29uc3VsL2xpc3RlbmVyLmdv) | `81.25% <ø> (ø)` | |
   | [registry/consul/registry.go](https://codecov.io/gh/apache/dubbo-go/pull/589/diff?src=pr&el=tree#diff-cmVnaXN0cnkvY29uc3VsL3JlZ2lzdHJ5Lmdv) | `43.83% <0.00%> (ø)` | |
   | [registry/directory/directory.go](https://codecov.io/gh/apache/dubbo-go/pull/589/diff?src=pr&el=tree#diff-cmVnaXN0cnkvZGlyZWN0b3J5L2RpcmVjdG9yeS5nbw==) | `80.11% <ø> (ø)` | |
   | [registry/etcdv3/listener.go](https://codecov.io/gh/apache/dubbo-go/pull/589/diff?src=pr&el=tree#diff-cmVnaXN0cnkvZXRjZHYzL2xpc3RlbmVyLmdv) | `72.34% <ø> (ø)` | |
   | [registry/etcdv3/registry.go](https://codecov.io/gh/apache/dubbo-go/pull/589/diff?src=pr&el=tree#diff-cmVnaXN0cnkvZXRjZHYzL3JlZ2lzdHJ5Lmdv) | `73.13% <ø> (ø)` | |
   | [registry/kubernetes/listener.go](https://codecov.io/gh/apache/dubbo-go/pull/589/diff?src=pr&el=tree#diff-cmVnaXN0cnkva3ViZXJuZXRlcy9saXN0ZW5lci5nbw==) | `72.34% <ø> (ø)` | |
   | [registry/kubernetes/registry.go](https://codecov.io/gh/apache/dubbo-go/pull/589/diff?src=pr&el=tree#diff-cmVnaXN0cnkva3ViZXJuZXRlcy9yZWdpc3RyeS5nbw==) | `57.69% <ø> (ø)` | |
   | [registry/nacos/listener.go](https://codecov.io/gh/apache/dubbo-go/pull/589/diff?src=pr&el=tree#diff-cmVnaXN0cnkvbmFjb3MvbGlzdGVuZXIuZ28=) | `80.00% <ø> (ø)` | |
   | [registry/nacos/registry.go](https://codecov.io/gh/apache/dubbo-go/pull/589/diff?src=pr&el=tree#diff-cmVnaXN0cnkvbmFjb3MvcmVnaXN0cnkuZ28=) | `58.42% <ø> (ø)` | |
   | ... and [26 more](https://codecov.io/gh/apache/dubbo-go/pull/589/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo-go/pull/589?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/dubbo-go/pull/589?src=pr&el=footer). Last update [106040d...6f2801c](https://codecov.io/gh/apache/dubbo-go/pull/589?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go] AlexStocks merged pull request #589: Mod: update the comments in registy directory

Posted by GitBox <gi...@apache.org>.
AlexStocks merged pull request #589:
URL: https://github.com/apache/dubbo-go/pull/589


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go] codecov-commenter edited a comment on pull request #589: Mod: update the comments in registy directory

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #589:
URL: https://github.com/apache/dubbo-go/pull/589#issuecomment-640154457


   # [Codecov](https://codecov.io/gh/apache/dubbo-go/pull/589?src=pr&el=h1) Report
   > Merging [#589](https://codecov.io/gh/apache/dubbo-go/pull/589?src=pr&el=desc) into [develop](https://codecov.io/gh/apache/dubbo-go/commit/106040d53d8e0f799615fd3f4796fb2c9008d9fc&el=desc) will **increase** coverage by `0.57%`.
   > The diff coverage is `50.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/dubbo-go/pull/589/graphs/tree.svg?width=650&height=150&src=pr&token=dcPE6RyFAL)](https://codecov.io/gh/apache/dubbo-go/pull/589?src=pr&el=tree)
   
   ```diff
   @@             Coverage Diff             @@
   ##           develop     #589      +/-   ##
   ===========================================
   + Coverage    66.80%   67.37%   +0.57%     
   ===========================================
     Files          185      188       +3     
     Lines         9749     9849     +100     
   ===========================================
   + Hits          6513     6636     +123     
   + Misses        2600     2559      -41     
   - Partials       636      654      +18     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/dubbo-go/pull/589?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [config\_center/configuration\_listener.go](https://codecov.io/gh/apache/dubbo-go/pull/589/diff?src=pr&el=tree#diff-Y29uZmlnX2NlbnRlci9jb25maWd1cmF0aW9uX2xpc3RlbmVyLmdv) | `0.00% <ø> (ø)` | |
   | [registry/consul/listener.go](https://codecov.io/gh/apache/dubbo-go/pull/589/diff?src=pr&el=tree#diff-cmVnaXN0cnkvY29uc3VsL2xpc3RlbmVyLmdv) | `81.25% <ø> (ø)` | |
   | [registry/consul/registry.go](https://codecov.io/gh/apache/dubbo-go/pull/589/diff?src=pr&el=tree#diff-cmVnaXN0cnkvY29uc3VsL3JlZ2lzdHJ5Lmdv) | `43.83% <0.00%> (ø)` | |
   | [registry/directory/directory.go](https://codecov.io/gh/apache/dubbo-go/pull/589/diff?src=pr&el=tree#diff-cmVnaXN0cnkvZGlyZWN0b3J5L2RpcmVjdG9yeS5nbw==) | `80.11% <ø> (ø)` | |
   | [registry/etcdv3/listener.go](https://codecov.io/gh/apache/dubbo-go/pull/589/diff?src=pr&el=tree#diff-cmVnaXN0cnkvZXRjZHYzL2xpc3RlbmVyLmdv) | `72.34% <ø> (ø)` | |
   | [registry/etcdv3/registry.go](https://codecov.io/gh/apache/dubbo-go/pull/589/diff?src=pr&el=tree#diff-cmVnaXN0cnkvZXRjZHYzL3JlZ2lzdHJ5Lmdv) | `73.13% <ø> (ø)` | |
   | [registry/kubernetes/listener.go](https://codecov.io/gh/apache/dubbo-go/pull/589/diff?src=pr&el=tree#diff-cmVnaXN0cnkva3ViZXJuZXRlcy9saXN0ZW5lci5nbw==) | `72.34% <ø> (ø)` | |
   | [registry/kubernetes/registry.go](https://codecov.io/gh/apache/dubbo-go/pull/589/diff?src=pr&el=tree#diff-cmVnaXN0cnkva3ViZXJuZXRlcy9yZWdpc3RyeS5nbw==) | `67.30% <ø> (+9.61%)` | :arrow_up: |
   | [registry/nacos/listener.go](https://codecov.io/gh/apache/dubbo-go/pull/589/diff?src=pr&el=tree#diff-cmVnaXN0cnkvbmFjb3MvbGlzdGVuZXIuZ28=) | `80.00% <ø> (ø)` | |
   | [registry/nacos/registry.go](https://codecov.io/gh/apache/dubbo-go/pull/589/diff?src=pr&el=tree#diff-cmVnaXN0cnkvbmFjb3MvcmVnaXN0cnkuZ28=) | `58.42% <ø> (ø)` | |
   | ... and [27 more](https://codecov.io/gh/apache/dubbo-go/pull/589/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo-go/pull/589?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/dubbo-go/pull/589?src=pr&el=footer). Last update [106040d...6f2801c](https://codecov.io/gh/apache/dubbo-go/pull/589?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go] codecov-commenter edited a comment on pull request #589: Mod: update the comments in registy directory

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #589:
URL: https://github.com/apache/dubbo-go/pull/589#issuecomment-640154457


   # [Codecov](https://codecov.io/gh/apache/dubbo-go/pull/589?src=pr&el=h1) Report
   > Merging [#589](https://codecov.io/gh/apache/dubbo-go/pull/589?src=pr&el=desc) into [develop](https://codecov.io/gh/apache/dubbo-go/commit/106040d53d8e0f799615fd3f4796fb2c9008d9fc&el=desc) will **increase** coverage by `0.66%`.
   > The diff coverage is `50.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/dubbo-go/pull/589/graphs/tree.svg?width=650&height=150&src=pr&token=dcPE6RyFAL)](https://codecov.io/gh/apache/dubbo-go/pull/589?src=pr&el=tree)
   
   ```diff
   @@             Coverage Diff             @@
   ##           develop     #589      +/-   ##
   ===========================================
   + Coverage    66.80%   67.46%   +0.66%     
   ===========================================
     Files          185      188       +3     
     Lines         9749     9852     +103     
   ===========================================
   + Hits          6513     6647     +134     
   + Misses        2600     2552      -48     
   - Partials       636      653      +17     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/dubbo-go/pull/589?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [config\_center/configuration\_listener.go](https://codecov.io/gh/apache/dubbo-go/pull/589/diff?src=pr&el=tree#diff-Y29uZmlnX2NlbnRlci9jb25maWd1cmF0aW9uX2xpc3RlbmVyLmdv) | `0.00% <ø> (ø)` | |
   | [registry/consul/listener.go](https://codecov.io/gh/apache/dubbo-go/pull/589/diff?src=pr&el=tree#diff-cmVnaXN0cnkvY29uc3VsL2xpc3RlbmVyLmdv) | `81.25% <ø> (ø)` | |
   | [registry/consul/registry.go](https://codecov.io/gh/apache/dubbo-go/pull/589/diff?src=pr&el=tree#diff-cmVnaXN0cnkvY29uc3VsL3JlZ2lzdHJ5Lmdv) | `43.83% <0.00%> (ø)` | |
   | [registry/directory/directory.go](https://codecov.io/gh/apache/dubbo-go/pull/589/diff?src=pr&el=tree#diff-cmVnaXN0cnkvZGlyZWN0b3J5L2RpcmVjdG9yeS5nbw==) | `80.11% <ø> (ø)` | |
   | [registry/etcdv3/listener.go](https://codecov.io/gh/apache/dubbo-go/pull/589/diff?src=pr&el=tree#diff-cmVnaXN0cnkvZXRjZHYzL2xpc3RlbmVyLmdv) | `72.34% <ø> (ø)` | |
   | [registry/etcdv3/registry.go](https://codecov.io/gh/apache/dubbo-go/pull/589/diff?src=pr&el=tree#diff-cmVnaXN0cnkvZXRjZHYzL3JlZ2lzdHJ5Lmdv) | `73.13% <ø> (ø)` | |
   | [registry/kubernetes/listener.go](https://codecov.io/gh/apache/dubbo-go/pull/589/diff?src=pr&el=tree#diff-cmVnaXN0cnkva3ViZXJuZXRlcy9saXN0ZW5lci5nbw==) | `72.34% <ø> (ø)` | |
   | [registry/kubernetes/registry.go](https://codecov.io/gh/apache/dubbo-go/pull/589/diff?src=pr&el=tree#diff-cmVnaXN0cnkva3ViZXJuZXRlcy9yZWdpc3RyeS5nbw==) | `57.69% <ø> (ø)` | |
   | [registry/nacos/listener.go](https://codecov.io/gh/apache/dubbo-go/pull/589/diff?src=pr&el=tree#diff-cmVnaXN0cnkvbmFjb3MvbGlzdGVuZXIuZ28=) | `80.00% <ø> (ø)` | |
   | [registry/nacos/registry.go](https://codecov.io/gh/apache/dubbo-go/pull/589/diff?src=pr&el=tree#diff-cmVnaXN0cnkvbmFjb3MvcmVnaXN0cnkuZ28=) | `58.42% <ø> (ø)` | |
   | ... and [26 more](https://codecov.io/gh/apache/dubbo-go/pull/589/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo-go/pull/589?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/dubbo-go/pull/589?src=pr&el=footer). Last update [106040d...32df9e8](https://codecov.io/gh/apache/dubbo-go/pull/589?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go] AlexStocks commented on a change in pull request #589: Mod: update the comments in registy directory

Posted by GitBox <gi...@apache.org>.
AlexStocks commented on a change in pull request #589:
URL: https://github.com/apache/dubbo-go/pull/589#discussion_r440098610



##########
File path: config_center/configuration_listener.go
##########
@@ -27,6 +27,7 @@ import (
 
 // ConfigurationListener for changing listener's event
 type ConfigurationListener interface {
+	// Process notified once there's any change happens on the config

Review comment:
       Process the notification event once there's any change happens on the config

##########
File path: registry/base_configuration_listener.go
##########
@@ -82,14 +82,14 @@ func (bcl *BaseConfigurationListener) genConfiguratorFromRawRule(rawConfig strin
 	return nil
 }
 
-// OverrideUrl ...
+// OverrideUrl gets existing configuration rule and override provider url before exporting.

Review comment:
       OverrideUrl gets existing configuration rule and overrides provider url before exporting.

##########
File path: registry/consul/listener.go
##########
@@ -187,6 +187,7 @@ func (l *consulListener) handler(idx uint64, raw interface{}) {
 	}
 }
 
+// Next returns next service event once received

Review comment:
       Next returns the service event from consul.

##########
File path: registry/base_configuration_listener.go
##########
@@ -82,14 +82,14 @@ func (bcl *BaseConfigurationListener) genConfiguratorFromRawRule(rawConfig strin
 	return nil
 }
 
-// OverrideUrl ...
+// OverrideUrl gets existing configuration rule and override provider url before exporting.
 func (bcl *BaseConfigurationListener) OverrideUrl(url *common.URL) {
 	for _, v := range bcl.configurators {
 		v.Configure(url)
 	}
 }
 
-// ToConfigurators ...
+// ToConfigurators converts override urls to map for use when re-refer. Send all rules every time, the urls will be reassembled and  calculated

Review comment:
       ToConfigurators converts override urls to map for use when re-refer. Send all rules every time, the urls will be reassembled and  calculated
   
   把汉语句子发给我,我来改。

##########
File path: registry/base_configuration_listener.go
##########
@@ -29,19 +29,19 @@ import (
 	"github.com/apache/dubbo-go/remoting"
 )
 
-// BaseConfigurationListener ...
+// nolint
 type BaseConfigurationListener struct {
 	configurators           []config_center.Configurator
 	dynamicConfiguration    config_center.DynamicConfiguration
 	defaultConfiguratorFunc func(url *common.URL) config_center.Configurator
 }
 
-// Configurators ...
+// Configurators gets Configurator from config center
 func (bcl *BaseConfigurationListener) Configurators() []config_center.Configurator {
 	return bcl.configurators
 }
 
-// InitWith ...
+// InitWith will init BaseConfigurationListener with @key 、@listener and @f

Review comment:
       InitWith will init BaseConfigurationListener by @key+@listener+@f

##########
File path: registry/mock_registry.go
##########
@@ -30,13 +30,13 @@ import (
 	"github.com/apache/dubbo-go/common/logger"
 )
 
-// MockRegistry ...
+// MockRegistry is use for mock registry

Review comment:
       MockRegistry is used as mock registry

##########
File path: registry/mock_registry.go
##########
@@ -46,23 +46,23 @@ func NewMockRegistry(url *common.URL) (Registry, error) {
 	return registry, nil
 }
 
-// Register ...
+// Register is use for register a mock registry
 func (*MockRegistry) Register(url common.URL) error {
 	return nil
 }
 
-// Destroy ...
+// Destroy is use for destory a mock registry
 func (r *MockRegistry) Destroy() {
 	if r.destroyed.CAS(false, true) {
 	}
 }
 
-// IsAvailable ...
+// IsAvailable is use for determine a mock registry available
 func (r *MockRegistry) IsAvailable() bool {
 	return !r.destroyed.Load()
 }
 
-// GetUrl ...
+// GetUrl is use for register a mock registry URL

Review comment:
       nolint

##########
File path: registry/etcdv3/listener.go
##########
@@ -38,15 +38,17 @@ type dataListener struct {
 	listener      config_center.ConfigurationListener
 }
 
-// NewRegistryDataListener
+// NewRegistryDataListener creates a data listener for etcd
 func NewRegistryDataListener(listener config_center.ConfigurationListener) *dataListener {
 	return &dataListener{listener: listener}
 }
 
+// AddInterestedURL add more URL of registry center to listen
 func (l *dataListener) AddInterestedURL(url *common.URL) {
 	l.interestedURL = append(l.interestedURL, url)
 }
 
+// Process data change event from registry center of etcd
 func (l *dataListener) DataChange(eventType remoting.Event) bool {

Review comment:
       DataChange processes the data change event from registry center of etcd

##########
File path: registry/mock_registry.go
##########
@@ -123,7 +123,7 @@ func (*listener) Close() {
 
 }
 
-// MockEvent ...
+// MockEvent is use for register a mock event

Review comment:
       nolint

##########
File path: registry/consul/registry.go
##########
@@ -156,10 +158,12 @@ func (r *consulRegistry) getListener(url common.URL) (registry.Listener, error)
 	return listener, err
 }
 
+// GetUrl get registry URL of consul registry center
 func (r *consulRegistry) GetUrl() common.URL {
 	return *r.URL
 }
 
+// IsAvailable determines consul registry center whether is available

Review comment:
       IsAvailable checks whether the consul registry center is available or not.

##########
File path: registry/zookeeper/registry.go
##########
@@ -116,6 +116,7 @@ func newMockZkRegistry(url *common.URL, opts ...zookeeper.Option) (*zk.TestClust
 	return c, r, nil
 }
 
+// InitListeners init listeners of zookeeper registry center

Review comment:
       InitListeners initializes listeners of zookeeper registry center

##########
File path: registry/kubernetes/listener.go
##########
@@ -91,10 +91,12 @@ func NewConfigurationListener(reg *kubernetesRegistry) *configurationListener {
 	return &configurationListener{registry: reg, events: make(chan *config_center.ConfigChangeEvent, 32)}
 }
 
+// Process data change event from config center of kubernetes

Review comment:
       Process processes the data change event from config center of kubernetes

##########
File path: registry/protocol/protocol.go
##########
@@ -229,6 +231,7 @@ func newOverrideSubscribeListener(overriderUrl *common.URL, invoker protocol.Inv
 	return &overrideSubscribeListener{url: overriderUrl, originInvoker: invoker, protocol: proto}
 }
 
+// Notify will triggered when a service change notification is received.

Review comment:
       Notify will be triggered when a service change notification is received.

##########
File path: registry/nacos/listener.go
##########
@@ -109,6 +109,7 @@ func generateUrl(instance model.Instance) *common.URL {
 	)
 }
 
+// Callback will callback when subscribed

Review comment:
       Callback will be invoked when got subscribed events.

##########
File path: registry/nacos/registry.go
##########
@@ -174,14 +175,17 @@ func (nr *nacosRegistry) Subscribe(url *common.URL, notifyListener registry.Noti
 	}
 }
 
+// GetUrl get registry URL of nacos registry center

Review comment:
       GetUrl gets its registration URL

##########
File path: registry/nacos/registry.go
##########
@@ -174,14 +175,17 @@ func (nr *nacosRegistry) Subscribe(url *common.URL, notifyListener registry.Noti
 	}
 }
 
+// GetUrl get registry URL of nacos registry center
 func (nr *nacosRegistry) GetUrl() common.URL {
 	return *nr.URL
 }
 
+// IsAvailable determines nacos registry center whether is available
 func (nr *nacosRegistry) IsAvailable() bool {
 	return true
 }
 
+// Destroy nacos registry center

Review comment:
       nolint

##########
File path: registry/zookeeper/registry.go
##########
@@ -141,35 +142,43 @@ func (r *zkRegistry) InitListeners() {
 	r.dataListener = newDataListener
 }
 
+// CreatePath create the path in the registry center of zookeeper
 func (r *zkRegistry) CreatePath(path string) error {
 	return r.ZkClient().Create(path)
 }
 
+// DoRegister actually do the register job in the registry center of zookeeper
 func (r *zkRegistry) DoRegister(root string, node string) error {
 	return r.registerTempZookeeperNode(root, node)
 }
 
+// DoSubscribe actually subscribe the provider URL

Review comment:
       subscribes

##########
File path: registry/zookeeper/registry.go
##########
@@ -141,35 +142,43 @@ func (r *zkRegistry) InitListeners() {
 	r.dataListener = newDataListener
 }
 
+// CreatePath create the path in the registry center of zookeeper

Review comment:
       creates

##########
File path: registry/etcdv3/listener.go
##########
@@ -38,15 +38,17 @@ type dataListener struct {
 	listener      config_center.ConfigurationListener
 }
 
-// NewRegistryDataListener
+// NewRegistryDataListener creates a data listener for etcd
 func NewRegistryDataListener(listener config_center.ConfigurationListener) *dataListener {
 	return &dataListener{listener: listener}
 }
 
+// AddInterestedURL add more URL of registry center to listen

Review comment:
       AddInterestedURL adds a registration @url to @l.

##########
File path: registry/mock_registry.go
##########
@@ -46,23 +46,23 @@ func NewMockRegistry(url *common.URL) (Registry, error) {
 	return registry, nil
 }
 
-// Register ...
+// Register is use for register a mock registry

Review comment:
       Register is used as a mock registry

##########
File path: registry/base_configuration_listener.go
##########
@@ -60,7 +60,7 @@ func (bcl *BaseConfigurationListener) InitWith(key string, listener config_cente
 	}
 }
 
-// Process ...
+// Process can reference ConfigurationListener.Process

Review comment:
       "Process can reference ConfigurationListener.Process" I can not get what the meaning of it.

##########
File path: registry/consul/registry.go
##########
@@ -95,6 +95,7 @@ func (r *consulRegistry) register(url common.URL) error {
 	return r.client.Agent().ServiceRegister(service)
 }
 
+// Unregister service from consul registry center

Review comment:
       Unregister deletes service from consul registry center

##########
File path: registry/event.go
##########
@@ -36,7 +36,7 @@ func init() {
 // service event
 // ////////////////////////////////////////
 
-// ServiceEvent ...
+// ServiceEvent is create、update or delete event of service

Review comment:
       ServiceEvent includes create, update, delete event

##########
File path: registry/mock_registry.go
##########
@@ -30,13 +30,13 @@ import (
 	"github.com/apache/dubbo-go/common/logger"
 )
 
-// MockRegistry ...
+// MockRegistry is use for mock registry
 type MockRegistry struct {
 	listener  *listener
 	destroyed *atomic.Bool
 }
 
-// NewMockRegistry ...
+// NewMockRegistry  is use for create a mock registry

Review comment:
       NewMockRegistry creates a mock registry

##########
File path: registry/nacos/registry.go
##########
@@ -123,6 +123,7 @@ func createRegisterParam(url common.URL, serviceName string) vo.RegisterInstance
 	return instance
 }
 
+// Register service to nacos registry center

Review comment:
       Register will register the service @url to its nacos registry center

##########
File path: registry/event_listener.go
##########
@@ -36,6 +36,7 @@ type ConditionalEventListener interface {
 	Accept(e Event) bool
 }
 
+// ServiceInstancesChangedListener is use for the Service Discovery Changed

Review comment:
       ServiceInstancesChangedListener is used when the Service Discovery Changed

##########
File path: registry/nacos/listener.go
##########
@@ -198,6 +199,7 @@ func (nl *nacosListener) process(configType *config_center.ConfigChangeEvent) {
 	nl.events <- configType
 }
 
+// Next returns next service event once received

Review comment:
       Next returns the service event from nacos.

##########
File path: registry/mock_registry.go
##########
@@ -71,7 +71,7 @@ func (r *MockRegistry) subscribe(*common.URL) (Listener, error) {
 	return r.listener, nil
 }
 
-// Subscribe ...
+// Subscribe is use for subscribe a mock registry

Review comment:
       nolint

##########
File path: registry/mock_registry.go
##########
@@ -46,23 +46,23 @@ func NewMockRegistry(url *common.URL) (Registry, error) {
 	return registry, nil
 }
 
-// Register ...
+// Register is use for register a mock registry
 func (*MockRegistry) Register(url common.URL) error {
 	return nil
 }
 
-// Destroy ...
+// Destroy is use for destory a mock registry

Review comment:
       nolint

##########
File path: registry/kubernetes/listener.go
##########
@@ -38,12 +38,12 @@ type dataListener struct {
 	listener      config_center.ConfigurationListener
 }
 
-// NewRegistryDataListener
+// NewRegistryDataListener creates a data listener for kubernetes
 func NewRegistryDataListener(listener config_center.ConfigurationListener) *dataListener {
 	return &dataListener{listener: listener}
 }
 
-// AddInterestedURL
+// AddInterestedURL add more URL of registry center to listen

Review comment:
       AddInterestedURL adds the @url of registry center to the listener

##########
File path: registry/nacos/registry.go
##########
@@ -174,14 +175,17 @@ func (nr *nacosRegistry) Subscribe(url *common.URL, notifyListener registry.Noti
 	}
 }
 
+// GetUrl get registry URL of nacos registry center
 func (nr *nacosRegistry) GetUrl() common.URL {
 	return *nr.URL
 }
 
+// IsAvailable determines nacos registry center whether is available

Review comment:
       IsAvailable determines nacos registry center whether it is available




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go] AlexStocks commented on a change in pull request #589: Mod: update the comments in registy directory

Posted by GitBox <gi...@apache.org>.
AlexStocks commented on a change in pull request #589:
URL: https://github.com/apache/dubbo-go/pull/589#discussion_r439743136



##########
File path: registry/base_configuration_listener.go
##########
@@ -29,19 +29,19 @@ import (
 	"github.com/apache/dubbo-go/remoting"
 )
 
-// BaseConfigurationListener ...
+// BaseConfigurationListener will get notified when the config it listens on changes.

Review comment:
       I do not think we need a comment for this struct. A "nolint" is enough.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go] codecov-commenter commented on pull request #589: Mod: update the comments in registy directory

Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on pull request #589:
URL: https://github.com/apache/dubbo-go/pull/589#issuecomment-640154457


   # [Codecov](https://codecov.io/gh/apache/dubbo-go/pull/589?src=pr&el=h1) Report
   > Merging [#589](https://codecov.io/gh/apache/dubbo-go/pull/589?src=pr&el=desc) into [develop](https://codecov.io/gh/apache/dubbo-go/commit/106040d53d8e0f799615fd3f4796fb2c9008d9fc&el=desc) will **increase** coverage by `0.57%`.
   > The diff coverage is `50.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/dubbo-go/pull/589/graphs/tree.svg?width=650&height=150&src=pr&token=dcPE6RyFAL)](https://codecov.io/gh/apache/dubbo-go/pull/589?src=pr&el=tree)
   
   ```diff
   @@             Coverage Diff             @@
   ##           develop     #589      +/-   ##
   ===========================================
   + Coverage    66.80%   67.37%   +0.57%     
   ===========================================
     Files          185      188       +3     
     Lines         9749     9849     +100     
   ===========================================
   + Hits          6513     6636     +123     
   + Misses        2600     2559      -41     
   - Partials       636      654      +18     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/dubbo-go/pull/589?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [config\_center/configuration\_listener.go](https://codecov.io/gh/apache/dubbo-go/pull/589/diff?src=pr&el=tree#diff-Y29uZmlnX2NlbnRlci9jb25maWd1cmF0aW9uX2xpc3RlbmVyLmdv) | `0.00% <ø> (ø)` | |
   | [registry/consul/listener.go](https://codecov.io/gh/apache/dubbo-go/pull/589/diff?src=pr&el=tree#diff-cmVnaXN0cnkvY29uc3VsL2xpc3RlbmVyLmdv) | `81.25% <ø> (ø)` | |
   | [registry/consul/registry.go](https://codecov.io/gh/apache/dubbo-go/pull/589/diff?src=pr&el=tree#diff-cmVnaXN0cnkvY29uc3VsL3JlZ2lzdHJ5Lmdv) | `43.83% <0.00%> (ø)` | |
   | [registry/directory/directory.go](https://codecov.io/gh/apache/dubbo-go/pull/589/diff?src=pr&el=tree#diff-cmVnaXN0cnkvZGlyZWN0b3J5L2RpcmVjdG9yeS5nbw==) | `80.11% <ø> (ø)` | |
   | [registry/etcdv3/listener.go](https://codecov.io/gh/apache/dubbo-go/pull/589/diff?src=pr&el=tree#diff-cmVnaXN0cnkvZXRjZHYzL2xpc3RlbmVyLmdv) | `72.34% <ø> (ø)` | |
   | [registry/etcdv3/registry.go](https://codecov.io/gh/apache/dubbo-go/pull/589/diff?src=pr&el=tree#diff-cmVnaXN0cnkvZXRjZHYzL3JlZ2lzdHJ5Lmdv) | `73.13% <ø> (ø)` | |
   | [registry/kubernetes/listener.go](https://codecov.io/gh/apache/dubbo-go/pull/589/diff?src=pr&el=tree#diff-cmVnaXN0cnkva3ViZXJuZXRlcy9saXN0ZW5lci5nbw==) | `72.34% <ø> (ø)` | |
   | [registry/kubernetes/registry.go](https://codecov.io/gh/apache/dubbo-go/pull/589/diff?src=pr&el=tree#diff-cmVnaXN0cnkva3ViZXJuZXRlcy9yZWdpc3RyeS5nbw==) | `67.30% <ø> (+9.61%)` | :arrow_up: |
   | [registry/nacos/listener.go](https://codecov.io/gh/apache/dubbo-go/pull/589/diff?src=pr&el=tree#diff-cmVnaXN0cnkvbmFjb3MvbGlzdGVuZXIuZ28=) | `80.00% <ø> (ø)` | |
   | [registry/nacos/registry.go](https://codecov.io/gh/apache/dubbo-go/pull/589/diff?src=pr&el=tree#diff-cmVnaXN0cnkvbmFjb3MvcmVnaXN0cnkuZ28=) | `58.42% <ø> (ø)` | |
   | ... and [27 more](https://codecov.io/gh/apache/dubbo-go/pull/589/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo-go/pull/589?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/dubbo-go/pull/589?src=pr&el=footer). Last update [106040d...cebc94a](https://codecov.io/gh/apache/dubbo-go/pull/589?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go] AlexStocks commented on a change in pull request #589: Mod: update the comments in registy directory

Posted by GitBox <gi...@apache.org>.
AlexStocks commented on a change in pull request #589:
URL: https://github.com/apache/dubbo-go/pull/589#discussion_r439743596



##########
File path: registry/zookeeper/registry.go
##########
@@ -141,35 +142,43 @@ func (r *zkRegistry) InitListeners() {
 	r.dataListener = newDataListener
 }
 
+// CreatePath create the path in the registry center of zookeeper
 func (r *zkRegistry) CreatePath(path string) error {
 	return r.ZkClient().Create(path)
 }
 
+// DoRegister actually do the register job in the registry center of zookeeper
 func (r *zkRegistry) DoRegister(root string, node string) error {
 	return r.registerTempZookeeperNode(root, node)
 }
 
+// DoSubscribe actually subscribe the provider URL
 func (r *zkRegistry) DoSubscribe(conf *common.URL) (registry.Listener, error) {
 	return r.getListener(conf)
 }
 
+// CloseAndNilClient closes listeners and clear client
 func (r *zkRegistry) CloseAndNilClient() {
 	r.client.Close()
 	r.client = nil
 }
 
+// ZkClient gets zookeeper client
 func (r *zkRegistry) ZkClient() *zookeeper.ZookeeperClient {
 	return r.client
 }
 
+// SetZkClient sets zookeeper client

Review comment:
        a `nolint` is enough.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go] codecov-commenter edited a comment on pull request #589: Mod: update the comments in registy directory

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #589:
URL: https://github.com/apache/dubbo-go/pull/589#issuecomment-640154457


   # [Codecov](https://codecov.io/gh/apache/dubbo-go/pull/589?src=pr&el=h1) Report
   > Merging [#589](https://codecov.io/gh/apache/dubbo-go/pull/589?src=pr&el=desc) into [develop](https://codecov.io/gh/apache/dubbo-go/commit/41879daf07c5dfa01849705c8a75752b7532dfae&el=desc) will **decrease** coverage by `0.11%`.
   > The diff coverage is `50.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/dubbo-go/pull/589/graphs/tree.svg?width=650&height=150&src=pr&token=dcPE6RyFAL)](https://codecov.io/gh/apache/dubbo-go/pull/589?src=pr&el=tree)
   
   ```diff
   @@             Coverage Diff             @@
   ##           develop     #589      +/-   ##
   ===========================================
   - Coverage    67.39%   67.28%   -0.12%     
   ===========================================
     Files          190      188       -2     
     Lines         9915     9854      -61     
   ===========================================
   - Hits          6682     6630      -52     
   + Misses        2579     2573       -6     
   + Partials       654      651       -3     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/dubbo-go/pull/589?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [config\_center/configuration\_listener.go](https://codecov.io/gh/apache/dubbo-go/pull/589/diff?src=pr&el=tree#diff-Y29uZmlnX2NlbnRlci9jb25maWd1cmF0aW9uX2xpc3RlbmVyLmdv) | `0.00% <ø> (ø)` | |
   | [registry/consul/listener.go](https://codecov.io/gh/apache/dubbo-go/pull/589/diff?src=pr&el=tree#diff-cmVnaXN0cnkvY29uc3VsL2xpc3RlbmVyLmdv) | `81.25% <ø> (ø)` | |
   | [registry/consul/registry.go](https://codecov.io/gh/apache/dubbo-go/pull/589/diff?src=pr&el=tree#diff-cmVnaXN0cnkvY29uc3VsL3JlZ2lzdHJ5Lmdv) | `43.83% <0.00%> (ø)` | |
   | [registry/directory/directory.go](https://codecov.io/gh/apache/dubbo-go/pull/589/diff?src=pr&el=tree#diff-cmVnaXN0cnkvZGlyZWN0b3J5L2RpcmVjdG9yeS5nbw==) | `80.11% <ø> (ø)` | |
   | [registry/etcdv3/listener.go](https://codecov.io/gh/apache/dubbo-go/pull/589/diff?src=pr&el=tree#diff-cmVnaXN0cnkvZXRjZHYzL2xpc3RlbmVyLmdv) | `72.34% <ø> (ø)` | |
   | [registry/etcdv3/registry.go](https://codecov.io/gh/apache/dubbo-go/pull/589/diff?src=pr&el=tree#diff-cmVnaXN0cnkvZXRjZHYzL3JlZ2lzdHJ5Lmdv) | `73.13% <ø> (ø)` | |
   | [registry/kubernetes/listener.go](https://codecov.io/gh/apache/dubbo-go/pull/589/diff?src=pr&el=tree#diff-cmVnaXN0cnkva3ViZXJuZXRlcy9saXN0ZW5lci5nbw==) | `72.34% <ø> (ø)` | |
   | [registry/kubernetes/registry.go](https://codecov.io/gh/apache/dubbo-go/pull/589/diff?src=pr&el=tree#diff-cmVnaXN0cnkva3ViZXJuZXRlcy9yZWdpc3RyeS5nbw==) | `67.30% <ø> (ø)` | |
   | [registry/nacos/listener.go](https://codecov.io/gh/apache/dubbo-go/pull/589/diff?src=pr&el=tree#diff-cmVnaXN0cnkvbmFjb3MvbGlzdGVuZXIuZ28=) | `80.00% <ø> (ø)` | |
   | [registry/nacos/registry.go](https://codecov.io/gh/apache/dubbo-go/pull/589/diff?src=pr&el=tree#diff-cmVnaXN0cnkvbmFjb3MvcmVnaXN0cnkuZ28=) | `58.42% <ø> (ø)` | |
   | ... and [26 more](https://codecov.io/gh/apache/dubbo-go/pull/589/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo-go/pull/589?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/dubbo-go/pull/589?src=pr&el=footer). Last update [41879da...cc499c2](https://codecov.io/gh/apache/dubbo-go/pull/589?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org