You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "justxuewei (via GitHub)" <gi...@apache.org> on 2023/02/01 03:30:59 UTC
[GitHub] [dubbo-go] justxuewei commented on a diff in pull request #2191: service mapping listener
justxuewei commented on code in PR #2191:
URL: https://github.com/apache/dubbo-go/pull/2191#discussion_r1092729700
##########
registry/mock_registry.go:
##########
@@ -19,6 +19,7 @@ package registry
import (
"fmt"
+ gxset "github.com/dubbogo/gost/container/set"
Review Comment:
Please format the imports using the import-formatter tool.
##########
registry/servicediscovery/service_discovery_registry.go:
##########
@@ -196,12 +204,22 @@ func (s *serviceDiscoveryRegistry) Subscribe(url *common.URL, notify registry.No
if err != nil {
return perrors.WithMessage(err, "subscribe url error: "+url.String())
}
- services := s.getServices(url)
+
+ mappingListener := event.NewMappingListener(s.url, url, s.subscribedServices, notify)
+ services := s.getServices(url, mappingListener)
if services.Empty() {
- return perrors.Errorf("Should has at least one way to know which services this interface belongs to, "+
- "subscription url:%s", url.String())
+ return nil
+ //return perrors.Errorf("Should has at least one way to know which services this interface belongs to, "+
+ // "subscription url:%s", url.String())
Review Comment:
Please remove it from the code if it is unused.
--
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