DMwangnima commented on code in PR #2502:
URL: https://github.com/apache/dubbo-go/pull/2502#discussion_r1399066168


##########
client/options.go:
##########
@@ -267,9 +273,9 @@ func WithLoadBalanceP2C() ReferenceOption {
        }
 }
 
-func WithLoadBalanceXDSRingHash() ReferenceOption {
+func WithLoadBalance(lb string) ReferenceOption {

Review Comment:
   Not only do we need to enumerate, but we also need to leave a generic 
configuration API?



##########
protocol/triple/health/triple_health/health.triple.go:
##########
@@ -94,22 +94,30 @@ type HealthImpl struct {
 }
 
 func (c *HealthImpl) Check(ctx context.Context, req *HealthCheckRequest, opts 
...client.CallOption) (*HealthCheckResponse, error) {
+       opts = appendGroupVersion(opts, c)
        resp := new(HealthCheckResponse)
-       if err := c.cli.CallUnary(ctx, req, resp, "grpc.health.v1.Health", 
"Check", c.group, c.version, opts...); err != nil {
+       if err := c.cli.CallUnary(ctx, req, resp, "grpc.health.v1.Health", 
"Check", opts...); err != nil {
                return nil, err
        }
        return resp, nil
 }
 
 func (c *HealthImpl) Watch(ctx context.Context, req *HealthCheckRequest, opts 
...client.CallOption) (Health_WatchClient, error) {
-       stream, err := c.cli.CallServerStream(ctx, req, 
"grpc.health.v1.Health", "Watch", c.group, c.version, opts...)
+       opts = appendGroupVersion(opts, c)
+       stream, err := c.cli.CallServerStream(ctx, req, 
"grpc.health.v1.Health", "Watch", opts...)
        if err != nil {
                return nil, err
        }
        rawStream := stream.(*triple_protocol.ServerStreamForClient)
        return &HealthWatchClient{rawStream}, nil
 }
 
+func appendGroupVersion(opts []client.CallOption, c *HealthImpl) 
[]client.CallOption {

Review Comment:
   What if users passing ```WithGroup``` and ```WithVersion``` directly? Should 
we set priority or just ignore?



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