Skip to content

Commit ddde090

Browse files
author
klim0v
committed
update grpc default opts
1 parent 879851a commit ddde090

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

api/grpc_client/grpc_client.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import (
1414
"github.com/grpc-ecosystem/grpc-gateway/v2/runtime"
1515
"google.golang.org/grpc"
1616
"google.golang.org/grpc/codes"
17+
"google.golang.org/grpc/credentials/insecure"
1718
"google.golang.org/grpc/status"
1819
"google.golang.org/protobuf/encoding/protojson"
1920
"google.golang.org/protobuf/proto"
@@ -34,7 +35,7 @@ func New(address string) (*Client, error) {
3435
clientConn, err := grpc.Dial(address,
3536
grpc.WithStreamInterceptor(grpc_retry.StreamClientInterceptor()),
3637
grpc.WithUnaryInterceptor(grpc_retry.UnaryClientInterceptor()),
37-
grpc.WithInsecure(),
38+
grpc.WithTransportCredentials(insecure.NewCredentials()),
3839
grpc.WithStreamInterceptor(grpc_retry.StreamClientInterceptor()),
3940
grpc.WithUnaryInterceptor(grpc_retry.UnaryClientInterceptor()),
4041
grpc.WithDefaultCallOptions(grpc.MaxCallRecvMsgSize(1000000000)))

0 commit comments

Comments
 (0)