Skip to content
Closed
Show file tree
Hide file tree
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
10 changes: 10 additions & 0 deletions go/cmd/vtgateproxy/vtgateproxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,24 @@ import (
"google.golang.org/grpc/channelz/service"

"vitess.io/vitess/go/exit"
"vitess.io/vitess/go/stats"
"vitess.io/vitess/go/stats/prometheusbackend"
"vitess.io/vitess/go/trace"
"vitess.io/vitess/go/vt/grpcclient"
"vitess.io/vitess/go/vt/grpccommon"
"vitess.io/vitess/go/vt/servenv"
"vitess.io/vitess/go/vt/vtgate/grpcvtgateconn"
"vitess.io/vitess/go/vt/vtgateproxy"
)

func init() {
servenv.RegisterDefaultFlags()
servenv.RegisterGRPCServerFlags()
servenv.OnParseFor("vtgateproxy", trace.RegisterFlags)
servenv.OnParseFor("vtgateproxy", stats.RegisterFlags)
servenv.OnParseFor("vtgateproxy", grpccommon.RegisterFlags)
servenv.OnParseFor("vtgateproxy", grpcclient.RegisterFlags)
servenv.OnParseFor("vtgateproxy", grpcvtgateconn.RegisterFlags)
}

func main() {
Expand Down
1 change: 0 additions & 1 deletion go/vt/grpcclient/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ var (
"vtctld",
"vtgate",
"vtgateclienttest",
"vtgateproxy",
"vtorc",
"vttablet",
"vttestserver",
Expand Down
3 changes: 0 additions & 3 deletions go/vt/servenv/servenv.go
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,6 @@ func init() {
"vtctlclient",
"vtctld",
"vtgate",
"vtgateproxy",
"vttablet",
} {
OnParseFor(cmd, trace.RegisterFlags)
Expand All @@ -454,7 +453,6 @@ func init() {
"vtgate",
"vtgateclienttest",
"vtorc",
"vtgateproxy",
"vttablet",
"vttestserver",
} {
Expand All @@ -467,7 +465,6 @@ func init() {
"vtcombo",
"vtctld",
"vtgate",
"vtgateproxy",
"vttablet",
"vtorc",
} {
Expand Down
5 changes: 2 additions & 3 deletions go/vt/vtgate/grpcvtgateconn/conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,12 @@ func init() {
"vtcombo",
"vtctl",
"vttestserver",
"vtgateproxy",
} {
servenv.OnParseFor(cmd, registerFlags)
servenv.OnParseFor(cmd, RegisterFlags)
}
}

func registerFlags(fs *pflag.FlagSet) {
func RegisterFlags(fs *pflag.FlagSet) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this need to be made public? I maybe misunderstand how this works

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

never mind - ignore me

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ya - This is part of the upstream PR vitessio#18551 and is consistent with a bunch of the other submodules.

That way the vtgateproxy binary can bind the flags in init like it does for the other dependencies it wants to pull in.

fs.StringVar(&cert, "vtgate_grpc_cert", "", "the cert to use to connect")
fs.StringVar(&key, "vtgate_grpc_key", "", "the key to use to connect")
fs.StringVar(&ca, "vtgate_grpc_ca", "", "the server ca to use to validate servers when connecting")
Expand Down
Loading