Skip to content

Commit

Permalink
add grpc_api_max_receive_message_size (#866)
Browse files Browse the repository at this point in the history
  • Loading branch information
FZambia authored Jul 28, 2024
1 parent 044eaff commit 0c43baf
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,7 @@ var defaults = map[string]any{
"grpc_api_tls_client_ca_pem": "",
"grpc_api_tls_server_name": "",
"grpc_api_tls_insecure_skip_verify": false,
"grpc_api_max_receive_message_size": 0,

"shutdown_timeout": 30 * time.Second,
"shutdown_termination_delay": 0,
Expand Down Expand Up @@ -773,6 +774,9 @@ func main() {
if viper.GetString("grpc_api_key") != "" {
grpcOpts = append(grpcOpts, api.GRPCKeyAuth(viper.GetString("grpc_api_key")))
}
if viper.GetInt("grpc_api_max_receive_message_size") > 0 {
grpcOpts = append(grpcOpts, grpc.MaxRecvMsgSize(viper.GetInt("grpc_api_max_receive_message_size")))
}
if viper.GetBool("grpc_api_tls") {
tlsConfig, tlsErr = tlsConfigForGRPC()
} else if !viper.GetBool("grpc_api_tls_disable") {
Expand Down

0 comments on commit 0c43baf

Please sign in to comment.