Skip to content

Commit

Permalink
Merge pull request prometheus#254 from jpkrohling/jpkrohling/issue239
Browse files Browse the repository at this point in the history
httpgrpc/server: Update NewClient to not use WithBalancerName
  • Loading branch information
bboreham authored Sep 13, 2022
2 parents 21e21be + ba79fa2 commit e98fcdf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions httpgrpc/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import (
"github.com/sercand/kuberesolver"
"golang.org/x/net/context"
"google.golang.org/grpc"
"google.golang.org/grpc/balancer/roundrobin"

"github.com/weaveworks/common/httpgrpc"
"github.com/weaveworks/common/logging"
Expand Down Expand Up @@ -132,9 +131,10 @@ func NewClient(address string) (*Client, error) {
if err != nil {
return nil, err
}
const grpcServiceConfig = `{"loadBalancingPolicy":"round_robin"}`

dialOptions := []grpc.DialOption{
grpc.WithBalancerName(roundrobin.Name),
grpc.WithDefaultServiceConfig(grpcServiceConfig),
grpc.WithInsecure(),
grpc.WithUnaryInterceptor(grpc_middleware.ChainUnaryClient(
otgrpc.OpenTracingClientInterceptor(opentracing.GlobalTracer()),
Expand Down

0 comments on commit e98fcdf

Please sign in to comment.