From 81dff32214702eda88d05f0da642624d45a27704 Mon Sep 17 00:00:00 2001 From: Maho Takara Date: Thu, 23 May 2024 00:21:44 +0000 Subject: [PATCH] update grpc api --- clustering/agent.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/clustering/agent.go b/clustering/agent.go index 35e8034a2..5ea286096 100644 --- a/clustering/agent.go +++ b/clustering/agent.go @@ -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 {