From ba67a2992ed6897954d56140916446579073fa4d Mon Sep 17 00:00:00 2001 From: Marc Sauter Date: Wed, 11 Oct 2023 19:27:34 +0200 Subject: [PATCH] chore: add etcd option --- etcd/config.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/etcd/config.go b/etcd/config.go index 9edb48d..a7418bd 100644 --- a/etcd/config.go +++ b/etcd/config.go @@ -381,6 +381,14 @@ func WithDialOptions(d ...grpc.DialOption) Opt { } } +// WithMaxCallRecvMsgSize add the default call option grpc.MaxCallRecvMsgSize with the given size +func WithMaxCallRecvMsgSize(bytes int) Opt { + return func(e *Backend) error { + e.dialOptions = append(e.dialOptions, grpc.WithDefaultCallOptions(grpc.MaxCallRecvMsgSize(bytes))) + return nil + } +} + type ssl struct { key []byte cert []byte