Skip to content

Commit

Permalink
Add comments
Browse files Browse the repository at this point in the history
Signed-off-by: Henry Robinson <hrobinson@slack-corp.com>
  • Loading branch information
henryr committed Aug 9, 2024
1 parent f29b478 commit 38f4a98
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions go/vt/grpccommon/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ var (
// accept. Larger messages will be rejected.
// Note: We're using 16 MiB as default value because that's the default in MySQL
maxMessageSize = 16 * 1024 * 1024
// These options override maxMessageSize if > 0, allowing us to control the max
// size sending independently from receiving.
maxMsgRecvSize = 0
maxMsgSendSize = 0
// enableTracing sets a flag to enable grpc client/server tracing.
Expand All @@ -45,8 +47,8 @@ var (
// command-line arguments.
func RegisterFlags(fs *pflag.FlagSet) {
fs.IntVar(&maxMessageSize, "grpc_max_message_size", maxMessageSize, "Maximum allowed RPC message size. Larger messages will be rejected by gRPC with the error 'exceeding the max size'.")
fs.IntVar(&maxMsgSendSize, "grpc_max_message_send_size", maxMsgSendSize, "")
fs.IntVar(&maxMsgRecvSize, "grpc_max_message_recv_size", maxMsgRecvSize, "")
fs.IntVar(&maxMsgSendSize, "grpc_max_message_send_size", maxMsgSendSize, "Maximum allowed RPC message size when sending. If 0, defaults to grpc_max_message_size.")
fs.IntVar(&maxMsgRecvSize, "grpc_max_message_recv_size", maxMsgRecvSize, "Maximum allowed RPC message size when receiving. If 0, defaults to grpc_max_message_size.")
fs.BoolVar(&enableTracing, "grpc_enable_tracing", enableTracing, "Enable gRPC tracing.")
fs.BoolVar(&enablePrometheus, "grpc_prometheus", enablePrometheus, "Enable gRPC monitoring with Prometheus.")
}
Expand Down

0 comments on commit 38f4a98

Please sign in to comment.