mirror of
https://github.com/zrepl/zrepl.git
synced 2024-12-22 07:00:44 +01:00
chore: grpc.DialContext has been deprecated
This commit is contained in:
parent
40fd700855
commit
48c5b60024
@ -3,7 +3,6 @@
|
||||
package grpchelper
|
||||
|
||||
import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
"google.golang.org/grpc"
|
||||
@ -38,7 +37,7 @@ func ClientConn(cn transport.Connecter, log Logger) *grpc.ClientConn {
|
||||
cred := grpc.WithTransportCredentials(grpcclientidentity.NewTransportCredentials(log))
|
||||
// we use context.Background without a timeout here because we don't set grpc.WithBlock
|
||||
// => docs: "In the non-blocking case, the ctx does not act against the connection. It only controls the setup steps."
|
||||
cc, err := grpc.DialContext(context.Background(), "doesn't matter done by dialer", dialerOption, cred, ka)
|
||||
cc, err := grpc.NewClient("passthrough://doesntmatterdonebydialer", dialerOption, cred, ka)
|
||||
if err != nil {
|
||||
log.WithError(err).Error("cannot create gRPC client conn (non-blocking)")
|
||||
// It's ok to panic here: the we call grpc.DialContext without the
|
||||
|
Loading…
Reference in New Issue
Block a user