mochengqian commented on code in PR #930:
URL: https://github.com/apache/dubbo-go-pixiu/pull/930#discussion_r3254278742


##########
pkg/adapter/llmregistry/registry/nacos/listener.go:
##########
@@ -316,10 +312,21 @@ func generateEndpoint(instance nacosModel.Instance) 
*model.Endpoint {
        }
 
        ret.Metadata = instance.Metadata
+       ret.ID = nacosEndpointID(instance, ret)
 
        return ret
 }
 
+func nacosEndpointID(instance nacosModel.Instance, endpoint *model.Endpoint) 
string {
+       if id := strings.TrimSpace(instance.Metadata["id"]); id != "" {
+               return id
+       }
+       if instanceID := strings.TrimSpace(instance.InstanceId); instanceID != 
"" {
+               return instanceID
+       }
+       return model.GenerateEndpointID(instance.Metadata["cluster"], endpoint)

Review Comment:
   ok ,I have resolved this issue. rereview pls.
   



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

Reply via email to