We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8cdd729 commit 77b5f2fCopy full SHA for 77b5f2f
1 file changed
client/internal/net/connection/connect.go
@@ -27,13 +27,18 @@ import (
27
errinterceptor "github.com/vanus-labs/vanus/api/grpc/interceptor/errors"
28
)
29
30
+const (
31
+ maxRecvMsgSize = 30 * 1024 * 1024
32
+)
33
+
34
func Connect(ctx context.Context, endpoint string) (*grpc.ClientConn, error) {
35
opts := []grpc.DialOption{
36
grpc.WithBlock(),
37
grpc.WithTransportCredentials(insecure.NewCredentials()),
38
grpc.WithUnaryInterceptor(otelgrpc.UnaryClientInterceptor()),
39
grpc.WithStreamInterceptor(otelgrpc.StreamClientInterceptor()),
40
grpc.WithUnaryInterceptor(errinterceptor.UnaryClientInterceptor()),
41
+ grpc.WithDefaultCallOptions(grpc.MaxCallRecvMsgSize(maxRecvMsgSize)),
42
}
43
conn, err := grpc.DialContext(ctx, endpoint, opts...)
44
if err != nil {
0 commit comments