Skip to content

Commit be9138d

Browse files
committed
Updating to non deprecated method
Signed-off-by: Shawn Hurley <[email protected]>
1 parent ed6be8f commit be9138d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

provider/grpc/provider.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ func start(ctx context.Context, config provider.Config) (*grpc.ClientConn, io.Re
300300
}
301301
if config.Address != "" {
302302
if config.CertPath == "" {
303-
conn, err := grpc.Dial(fmt.Sprintf(config.Address),
303+
conn, err := grpc.NewClient(fmt.Sprintf(config.Address),
304304
grpc.WithDefaultCallOptions(grpc.MaxCallRecvMsgSize(socket.MAX_MESSAGE_SIZE)),
305305
grpc.WithTransportCredentials(insecure.NewCredentials()))
306306
if err != nil {
@@ -313,7 +313,7 @@ func start(ctx context.Context, config provider.Config) (*grpc.ClientConn, io.Re
313313
return nil, nil, err
314314
}
315315
if config.JWTToken == "" {
316-
conn, err := grpc.Dial(fmt.Sprintf(config.Address),
316+
conn, err := grpc.NewClient(fmt.Sprintf(config.Address),
317317
grpc.WithDefaultCallOptions(grpc.MaxCallRecvMsgSize(socket.MAX_MESSAGE_SIZE)),
318318
grpc.WithTransportCredentials(creds))
319319
if err != nil {
@@ -325,7 +325,7 @@ func start(ctx context.Context, config provider.Config) (*grpc.ClientConn, io.Re
325325
i := &jwtTokeInterceptor{
326326
Token: config.JWTToken,
327327
}
328-
conn, err := grpc.Dial(fmt.Sprintf(config.Address),
328+
conn, err := grpc.NewClient(fmt.Sprintf(config.Address),
329329
grpc.WithDefaultCallOptions(grpc.MaxCallRecvMsgSize(socket.MAX_MESSAGE_SIZE)),
330330
grpc.WithTransportCredentials(creds), grpc.WithUnaryInterceptor(i.unaryInterceptor))
331331
if err != nil {

0 commit comments

Comments
 (0)