|
|
|
@ -14,6 +14,7 @@ import ( |
|
|
|
"github.com/dtm-labs/dtm/dtmcli/logger" |
|
|
|
"github.com/dtm-labs/dtm/dtmgrpc/dtmgpb" |
|
|
|
grpc "google.golang.org/grpc" |
|
|
|
"google.golang.org/grpc/credentials/insecure" |
|
|
|
) |
|
|
|
|
|
|
|
type rawCodec struct{} |
|
|
|
@ -58,7 +59,7 @@ func GetGrpcConn(grpcServer string, isRaw bool) (conn *grpc.ClientConn, rerr err |
|
|
|
logger.Debugf("grpc client connecting %s", grpcServer) |
|
|
|
interceptors := append(ClientInterceptors, GrpcClientLog) |
|
|
|
inOpt := grpc.WithChainUnaryInterceptor(interceptors...) |
|
|
|
conn, rerr := grpc.Dial(grpcServer, inOpt, grpc.WithInsecure(), opts) |
|
|
|
conn, rerr := grpc.Dial(grpcServer, inOpt, grpc.WithTransportCredentials(insecure.NewCredentials()), opts) |
|
|
|
if rerr == nil { |
|
|
|
clients.Store(grpcServer, conn) |
|
|
|
v = conn |
|
|
|
|