summaryrefslogtreecommitdiff
path: root/vendor/google.golang.org/grpc/dialoptions.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/google.golang.org/grpc/dialoptions.go')
-rw-r--r--vendor/google.golang.org/grpc/dialoptions.go14
1 files changed, 14 insertions, 0 deletions
diff --git a/vendor/google.golang.org/grpc/dialoptions.go b/vendor/google.golang.org/grpc/dialoptions.go
index 23ea95237..1fd0d5c12 100644
--- a/vendor/google.golang.org/grpc/dialoptions.go
+++ b/vendor/google.golang.org/grpc/dialoptions.go
@@ -139,6 +139,20 @@ func newJoinDialOption(opts ...DialOption) DialOption {
return &joinDialOption{opts: opts}
}
+// WithSharedWriteBuffer allows reusing per-connection transport write buffer.
+// If this option is set to true every connection will release the buffer after
+// flushing the data on the wire.
+//
+// # Experimental
+//
+// Notice: This API is EXPERIMENTAL and may be changed or removed in a
+// later release.
+func WithSharedWriteBuffer(val bool) DialOption {
+ return newFuncDialOption(func(o *dialOptions) {
+ o.copts.SharedWriteBuffer = val
+ })
+}
+
// WithWriteBufferSize determines how much data can be batched before doing a
// write on the wire. The corresponding memory allocation for this buffer will
// be twice the size to keep syscalls low. The default value for this buffer is