...

Package experimental

import "google.golang.org/grpc/experimental"
Overview
Index

Overview ▾

Package experimental is a collection of experimental features that might have some rough edges to them. Housing experimental features in this package results in a user accessing these APIs as `experimental.Foo`, thereby making it explicit that the feature is experimental and using them in production code is at their own risk.

All APIs in this package are experimental.

func RecvBufferPool

func RecvBufferPool(bufferPool grpc.SharedBufferPool) grpc.ServerOption

RecvBufferPool returns a grpc.ServerOption that configures the server to use the provided shared buffer pool for parsing incoming messages. Depending on the application's workload, this could result in reduced memory allocation.

If you are unsure about how to implement a memory pool but want to utilize one, begin with grpc.NewSharedBufferPool.

Note: The shared buffer pool feature will not be active if any of the following options are used: StatsHandler, EnableTracing, or binary logging. In such cases, the shared buffer pool will be ignored.

Note: It is not recommended to use the shared buffer pool when compression is enabled.

func WithRecvBufferPool

func WithRecvBufferPool(bufferPool grpc.SharedBufferPool) grpc.DialOption

WithRecvBufferPool returns a grpc.DialOption that configures the use of bufferPool for parsing incoming messages on a grpc.ClientConn. Depending on the application's workload, this could result in reduced memory allocation.

If you are unsure about how to implement a memory pool but want to utilize one, begin with grpc.NewSharedBufferPool.

Note: The shared buffer pool feature will not be active if any of the following options are used: WithStatsHandler, EnableTracing, or binary logging. In such cases, the shared buffer pool will be ignored.

Note: It is not recommended to use the shared buffer pool when compression is enabled.