Skip to content

Commit

Permalink
♻️ Use GRPCClient.Opts func
Browse files Browse the repository at this point in the history
Signed-off-by: Rintaro Okamura <rintaro.okamura@gmail.com>
  • Loading branch information
rinx committed Jun 9, 2020
1 parent 31a478a commit f89fc37
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions pkg/tools/cli/loadtest/usecase/load.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,12 @@ func New(cfg *config.Data) (r runner.Runner, err error) {
eg: errgroup.Get(),
}

run.client = grpc.New(
grpc.WithAddrs(append([]string{cfg.Addr}, cfg.Client.Addrs...)...),
grpc.WithInsecure(cfg.Client.DialOption.Insecure),
clientOpts := append(
cfg.Client.Opts(),
grpc.WithAddrs(cfg.Addr),
grpc.WithErrGroup(run.eg),
)
run.client = grpc.New(clientOpts...)

run.loader, err = service.NewLoader(
service.WithOperation(cfg.Method),
Expand Down

0 comments on commit f89fc37

Please sign in to comment.