Skip to content

Commit

Permalink
add vtgate_grpc_fail_fast option
Browse files Browse the repository at this point in the history
  • Loading branch information
demmer committed May 22, 2024
1 parent 3dee7ad commit 214e91e
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions go/vt/vtgate/grpcvtgateconn/conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,12 @@ import (
)

var (
cert = flag.String("vtgate_grpc_cert", "", "the cert to use to connect")
key = flag.String("vtgate_grpc_key", "", "the key to use to connect")
ca = flag.String("vtgate_grpc_ca", "", "the server ca to use to validate servers when connecting")
crl = flag.String("vtgate_grpc_crl", "", "the server crl to use to validate server certificates when connecting")
name = flag.String("vtgate_grpc_server_name", "", "the server name to use to validate server certificate")
cert = flag.String("vtgate_grpc_cert", "", "the cert to use to connect")
key = flag.String("vtgate_grpc_key", "", "the key to use to connect")
ca = flag.String("vtgate_grpc_ca", "", "the server ca to use to validate servers when connecting")
crl = flag.String("vtgate_grpc_crl", "", "the server crl to use to validate server certificates when connecting")
name = flag.String("vtgate_grpc_server_name", "", "the server name to use to validate server certificate")
failFast = flag.Bool("vtgate_grpc_fail_fast", false, "whether to enable grpc fail fast when communicating with vtgate")
)

func init() {
Expand All @@ -68,7 +69,7 @@ func DialWithOpts(ctx context.Context, opts ...grpc.DialOption) vtgateconn.Diale

opts = append(opts, opt)

cc, err := grpcclient.Dial(address, grpcclient.FailFast(false), opts...)
cc, err := grpcclient.Dial(address, grpcclient.FailFast(*failFast), opts...)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit 214e91e

Please sign in to comment.