Skip to content

Commit f2e73e8

Browse files
committed
updated deprecated grpc func
Signed-off-by: Daniel Dowler <12484302+dandawg@users.noreply.github.com>
1 parent 51c776c commit f2e73e8

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

backend/src/v2/cacheutils/cache.go

+4-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import (
99
"os"
1010

1111
"google.golang.org/grpc"
12+
"google.golang.org/grpc/credentials/insecure"
1213
"google.golang.org/protobuf/encoding/protojson"
1314
"google.golang.org/protobuf/types/known/structpb"
1415

@@ -114,7 +115,9 @@ type Client struct {
114115
func NewClient() (*Client, error) {
115116
cacheEndPoint := cacheDefaultEndpoint()
116117
glog.Infof("Connecting to cache endpoint %s", cacheEndPoint)
117-
conn, err := grpc.Dial(cacheEndPoint, grpc.WithDefaultCallOptions(grpc.MaxCallRecvMsgSize(MaxClientGRPCMessageSize)), grpc.WithInsecure())
118+
conn, err := grpc.Dial(cacheEndPoint,
119+
grpc.WithDefaultCallOptions(grpc.MaxCallRecvMsgSize(MaxClientGRPCMessageSize)),
120+
grpc.WithTransportCredentials(insecure.NewCredentials()))
118121
if err != nil {
119122
return nil, fmt.Errorf("metadata.NewClient() failed: %w", err)
120123
}

0 commit comments

Comments
 (0)