AlexStocks commented on code in PR #2858:
URL: https://github.com/apache/dubbo-go/pull/2858#discussion_r2096990233
##########
dubbo.go:
##########
@@ -248,3 +263,26 @@ func SetProviderServiceWithInfo(svc common.RPCService,
info *common.ServiceInfo)
Info: info,
}
}
+
+func SetConsumerService(svc common.RPCService) {
+ conLock.Lock()
+ defer conLock.Unlock()
+ consumerServices[common.GetReference(svc)] = &client.ClientDefinition{
+ Svc: svc,
+ Info: nil,
Review Comment:
nil 不用赋值,默认值就是 nil
##########
dubbo.go:
##########
@@ -248,3 +263,26 @@ func SetProviderServiceWithInfo(svc common.RPCService,
info *common.ServiceInfo)
Info: info,
}
}
+
+func SetConsumerService(svc common.RPCService) {
+ conLock.Lock()
+ defer conLock.Unlock()
+ consumerServices[common.GetReference(svc)] = &client.ClientDefinition{
+ Svc: svc,
+ Info: nil,
+ Conn: nil,
+ }
+}
+
+func SetProviderService(svc common.RPCService) {
+ conLock.Lock()
+ defer conLock.Unlock()
+ providerServices[common.GetReference(svc)] = &server.ServiceDefinition{
+ Handler: svc,
+ Info: nil,
Review Comment:
nil 不用赋值,默认值就是 nil
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]