feat: support grpc balancer health check (#2736)

pull/2739/head
包子 2 years ago committed by GitHub
parent bd26120ec6
commit 8af9ca33bd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      transport/grpc/client.go

@ -165,7 +165,7 @@ func dial(ctx context.Context, insecure bool, opts ...ClientOption) (*grpc.Clien
sints = append(sints, options.streamInts...) sints = append(sints, options.streamInts...)
} }
grpcOpts := []grpc.DialOption{ 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.WithChainUnaryInterceptor(ints...),
grpc.WithChainStreamInterceptor(sints...), grpc.WithChainStreamInterceptor(sints...),
} }

Loading…
Cancel
Save