MCPcopy
hub / github.com/grpc/grpc-go / BufferPool

Function BufferPool

experimental/experimental.go:74–76  ·  view source on GitHub ↗

BufferPool returns a grpc.ServerOption that configures the server to use the provided buffer pool for parsing incoming messages and for temporary buffers when marshaling outgoing messages. By default, mem.DefaultBufferPool is used, and this option only exists to provide alternative buffer pool imple

(bufferPool mem.BufferPool)

Source from the content-addressed store, hash-verified

72// will generate a lot of garbage, reducing the overall benefit from using a
73// pool.
74func BufferPool(bufferPool mem.BufferPool) grpc.ServerOption {
75 return internal.BufferPool.(func(mem.BufferPool) grpc.ServerOption)(bufferPool)
76}
77
78// AcceptCompressors returns a CallOption that limits the values
79// advertised in the grpc-accept-encoding header for the provided RPC. The

Callers 2

Calls

no outgoing calls

Tested by 2