Skip to content

Commit 7732698

Browse files
authored
Merge pull request #352 from razvanpopa999/main
Update MaxRecvMessageSize for bigger deployments
2 parents 6d30024 + 81fde4b commit 7732698

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

main.go

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,12 @@ import (
1414
type CLI struct {
1515
Debug bool `short:"d" help:"Emit debug logs in addition to info logs."`
1616

17-
Network string `help:"Network on which to listen for gRPC connections." default:"tcp"`
18-
Address string `help:"Address at which to listen for gRPC connections." default:":9443"`
19-
TLSCertsDir string `help:"Directory containing server certs (tls.key, tls.crt) and the CA used to verify client certificates (ca.crt)" env:"TLS_SERVER_CERTS_DIR"`
20-
Dependencies string `help:"File containing dependencies to add to all functions."`
21-
Insecure bool `help:"Run without mTLS credentials. If you supply this flag --tls-server-certs-dir will be ignored."`
17+
Network string `help:"Network on which to listen for gRPC connections." default:"tcp"`
18+
Address string `help:"Address at which to listen for gRPC connections." default:":9443"`
19+
TLSCertsDir string `help:"Directory containing server certs (tls.key, tls.crt) and the CA used to verify client certificates (ca.crt)" env:"TLS_SERVER_CERTS_DIR"`
20+
Dependencies string `help:"File containing dependencies to add to all functions."`
21+
Insecure bool `help:"Run without mTLS credentials. If you supply this flag --tls-server-certs-dir will be ignored."`
22+
MaxRecvMessageSize int `help:"Maximum size of received messages in MB." default:"4"`
2223
}
2324

2425
// Run this Function.
@@ -38,7 +39,8 @@ func (c *CLI) Run() error {
3839
return function.Serve(&Function{dependencies: dependencies, log: log},
3940
function.Listen(c.Network, c.Address),
4041
function.MTLSCertificates(c.TLSCertsDir),
41-
function.Insecure(c.Insecure))
42+
function.Insecure(c.Insecure),
43+
function.MaxRecvMessageSize(c.MaxRecvMessageSize*1024*1024))
4244
}
4345

4446
func main() {

0 commit comments

Comments
 (0)