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 2022/10/14 08:55:41 UTC

[GitHub] [dubbo-go] jasondeng1997 opened a new pull request, #2075: add polaris subscribe

jasondeng1997 opened a new pull request, #2075:
URL: https://github.com/apache/dubbo-go/pull/2075

   <!--  Thanks for sending a pull request!
   Read https://github.com/apache/dubbo-go/blob/master/CONTRIBUTING.md before commit pull request.
   -->
   
   **What this PR does**: 
   
   **Which issue(s) this PR fixes**: 
   Fixes #
   
   **You should pay attention to items below to ensure your pr passes our ci test**
   We do not merge pr with ci tests failed
   
   - [ ] All ut passed (run 'go test ./...' in project root)
   - [ ] After go-fmt ed , run 'go fmt project' using goland.
   - [ ] Golangci-lint passed, run 'sudo golangci-lint run' in project root.
   - [ ] Your new-created file needs to have [apache license](https://raw.githubusercontent.com/dubbogo/resources/master/tools/license/license.txt) at the top, like other existed file does.
   - [ ] All integration test passed. You can run integration test locally (with docker env). Clone our [dubbo-go-samples](https://github.com/apache/dubbo-go-samples) project and replace the go.mod to your dubbo-go, and run 'sudo sh start_integration_test.sh' at root of samples project root. (M1 Slice is not Support)


-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

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] chuntaojun commented on a diff in pull request #2075: add polaris subscribe

Posted by GitBox <gi...@apache.org>.
chuntaojun commented on code in PR #2075:
URL: https://github.com/apache/dubbo-go/pull/2075#discussion_r1003005797


##########
registry/polaris/service_discovery.go:
##########
@@ -174,6 +174,12 @@ func (polaris *polarisServiceDiscovery) GetServices() *gxset.HashSet {
 	return polaris.services
 }
 
+// UnSubscribe returns nil if unsubscribing registry successfully. If not returns an error.
+func (pr *polarisRegistry) UnSubscribe(url *common.URL, notifyListener registry.NotifyListener) error {

Review Comment:
   这里加错了吧?



-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

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] chuntaojun commented on a diff in pull request #2075: add polaris subscribe

Posted by GitBox <gi...@apache.org>.
chuntaojun commented on code in PR #2075:
URL: https://github.com/apache/dubbo-go/pull/2075#discussion_r997649550


##########
registry/polaris/registry.go:
##########
@@ -167,8 +159,28 @@ func (pr *polarisRegistry) Subscribe(url *common.URL, notifyListener registry.No
 			<-time.After(time.Duration(RegistryConnDelay) * time.Second)
 			continue
 		}
+		serviceName := getServiceName(url)
+		watcher, err := pr.createPolarisWatcher(serviceName)
+		if err != nil {
+			return err
+		}
+
+		watcher.AddSubscriber(func(et remoting.EventType, instances []model.Instance) {
+			dubboInstances := make([]registry.ServiceInstance, 0, len(instances))

Review Comment:
   dubboInstances 通知到哪里?没看到



-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

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] jasondeng1997 closed pull request #2075: add polaris subscribe

Posted by GitBox <gi...@apache.org>.
jasondeng1997 closed pull request #2075: add polaris subscribe
URL: https://github.com/apache/dubbo-go/pull/2075


-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

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