mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-09-07 17:15:56 +00:00
Increase gRPC maximum message length
This commit is contained in:
parent
b7fcfb41d9
commit
0a86f6a97b
1 changed files with 4 additions and 0 deletions
|
|
@ -27,6 +27,8 @@ import (
|
|||
"google.golang.org/grpc/credentials"
|
||||
)
|
||||
|
||||
const maxMsgSize = 1024 * 1024 * 100 // 100 megs ought to be enough for anybody!
|
||||
|
||||
// GRPCClient is a client for working with the gRPC server.
|
||||
type GRPCClient struct {
|
||||
dialTarget string
|
||||
|
|
@ -74,6 +76,8 @@ func (c *GRPCClient) resetConn() error {
|
|||
opts = append(opts, grpc.WithInsecure())
|
||||
}
|
||||
|
||||
opts = append(opts, grpc.WithDefaultCallOptions(grpc.MaxCallRecvMsgSize(maxMsgSize)))
|
||||
|
||||
var err error
|
||||
if c.conn, err = grpc.Dial(c.dialTarget, opts...); err != nil {
|
||||
return errors.Wrap(err, "creating new grpc client")
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue