Skip to content

Commit

Permalink
update grpc api
Browse files Browse the repository at this point in the history
  • Loading branch information
takara9 committed May 23, 2024
1 parent f128cb9 commit 81dff32
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions clustering/agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,13 @@ func (f defaultAgentFactory) New(ctx context.Context, cluster *mocov1beta2.MySQL
Time: 1 * time.Minute,
}
cred := credentials.NewTLS(f.reloader.TLSClientConfig())
conn, err := grpc.DialContext(ctx, addr,
/*
"grpc.WithBlock() DialOption" is deleted in NewClient
Please see, https://pkg.go.dev/google.golang.org/grpc#WithBlock
this DialOption is not supported by NewClient. Will be supported throughout 1.x.
*/
conn, err := grpc.NewClient(addr,
grpc.WithAuthority(cluster.PodHostname(index)),
grpc.WithBlock(),
grpc.WithTransportCredentials(cred),
grpc.WithKeepaliveParams(kp))
if err != nil {
Expand Down

0 comments on commit 81dff32

Please sign in to comment.