From 8af9ca33bd969a56fdfbdd99d60c2bc7a6e8aec7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8C=85=E5=AD=90?= Date: Thu, 16 Mar 2023 13:02:38 +0800 Subject: [PATCH] feat: support grpc balancer health check (#2736) --- transport/grpc/client.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transport/grpc/client.go b/transport/grpc/client.go index 9c8dfa68a..2d614cb07 100644 --- a/transport/grpc/client.go +++ b/transport/grpc/client.go @@ -165,7 +165,7 @@ func dial(ctx context.Context, insecure bool, opts ...ClientOption) (*grpc.Clien sints = append(sints, options.streamInts...) } grpcOpts := []grpc.DialOption{ - grpc.WithDefaultServiceConfig(fmt.Sprintf(`{"loadBalancingConfig": [{"%s":{}}]}`, options.balancerName)), + grpc.WithDefaultServiceConfig(fmt.Sprintf(`{"loadBalancingConfig": [{"%s":{}}],"healthCheckConfig":{"serviceName":""}}`, options.balancerName)), grpc.WithChainUnaryInterceptor(ints...), grpc.WithChainStreamInterceptor(sints...), }