Skip to content

Commit

Permalink
Merge pull request #358 from goten4/master
Browse files Browse the repository at this point in the history
fix deprecated usage of grpc.WithBalancerName in runner/requester.go
  • Loading branch information
bojand committed May 27, 2022
2 parents 13d535b + 65c07d4 commit 1909abd
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 1909abd

Please sign in to comment.