Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add vtgate_grpc_fail_fast option #365

Merged
merged 1 commit into from
May 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading