Skip to content

Commit

Permalink
fix deprecated usage of grpc.WithBalancerName in runner/requester.go
Browse files Browse the repository at this point in the history
  • Loading branch information
Emmanuel BOUTON committed May 4, 2022
1 parent 45e9c1c commit 65c07d4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 0 additions & 2 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,3 @@ issues:
- path: protodesc/
text: "SA1019: package github.com/golang/protobuf"

- path: runner/requester.go
text: "SA1019: grpc.WithBalancerName"
3 changes: 2 additions & 1 deletion runner/requester.go
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,8 @@ func (b *Requester) newClientConn(withStatsHandler bool) (*grpc.ClientConn, erro
}

if b.config.lbStrategy != "" {
opts = append(opts, grpc.WithBalancerName(b.config.lbStrategy))
grpcServiceConfig := fmt.Sprintf(`{"loadBalancingPolicy":"%s"}`, b.config.lbStrategy)
opts = append(opts, grpc.WithDefaultServiceConfig(grpcServiceConfig))
}

// create client connection
Expand Down

0 comments on commit 65c07d4

Please sign in to comment.