Documentation ¶
Index ¶
- func ChainStreamClient(interceptors ...grpc.StreamClientInterceptor) grpc.StreamClientInterceptor
- func ChainStreamServer(interceptors ...grpc.StreamServerInterceptor) grpc.StreamServerInterceptor
- func ChainUnaryClient(interceptors ...grpc.UnaryClientInterceptor) grpc.UnaryClientInterceptor
- func ChainUnaryServer(interceptors ...grpc.UnaryServerInterceptor) grpc.UnaryServerInterceptor
- func StreamLoggerServerInterceptor(l *logging.Logger) grpc.StreamServerInterceptor
- func StreamTrafficServerInterceptor(acceptTraffic *atomic.Bool) grpc.StreamServerInterceptor
- func UnaryLoggerServerInterceptor(l *logging.Logger) grpc.UnaryServerInterceptor
- func UnaryTrafficServerInterceptor(acceptTraffic *atomic.Bool) grpc.UnaryServerInterceptor
- type WrappedServerStream
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ChainStreamClient ¶
func ChainStreamClient(interceptors ...grpc.StreamClientInterceptor) grpc.StreamClientInterceptor
ChainStreamClient creates a single interceptor out of a chain of many interceptors.
Execution is done in left-to-right order, including passing of context. For example ChainStreamClient(one, two, three) will execute one before two before three.
func ChainStreamServer ¶
func ChainStreamServer(interceptors ...grpc.StreamServerInterceptor) grpc.StreamServerInterceptor
ChainStreamServer creates a single interceptor out of a chain of many interceptors.
Execution is done in left-to-right order, including passing of context. For example ChainUnaryServer(one, two, three) will execute one before two before three. If you want to pass context between interceptors, use WrapServerStream.
func ChainUnaryClient ¶
func ChainUnaryClient(interceptors ...grpc.UnaryClientInterceptor) grpc.UnaryClientInterceptor
ChainUnaryClient creates a single interceptor out of a chain of many interceptors.
Execution is done in left-to-right order, including passing of context. For example ChainUnaryClient(one, two, three) will execute one before two before three.
func ChainUnaryServer ¶
func ChainUnaryServer(interceptors ...grpc.UnaryServerInterceptor) grpc.UnaryServerInterceptor
ChainUnaryServer creates a single interceptor out of a chain of many interceptors.
Execution is done in left-to-right order, including passing of context. For example ChainUnaryServer(one, two, three) will execute one before two before three, and three will see context changes of one and two.
func StreamLoggerServerInterceptor ¶
func StreamLoggerServerInterceptor(l *logging.Logger) grpc.StreamServerInterceptor
func StreamTrafficServerInterceptor ¶
func StreamTrafficServerInterceptor(acceptTraffic *atomic.Bool) grpc.StreamServerInterceptor
func UnaryLoggerServerInterceptor ¶
func UnaryLoggerServerInterceptor(l *logging.Logger) grpc.UnaryServerInterceptor
func UnaryTrafficServerInterceptor ¶
func UnaryTrafficServerInterceptor(acceptTraffic *atomic.Bool) grpc.UnaryServerInterceptor
Types ¶
type WrappedServerStream ¶
type WrappedServerStream struct { grpc.ServerStream // WrappedContext is the wrapper's own Context. You can assign it. WrappedContext context.Context }
func WrapServerStream ¶
func WrapServerStream(stream grpc.ServerStream) *WrappedServerStream
WrapServerStream returns a ServerStream that has the ability to overwrite context.
func (*WrappedServerStream) Context ¶
func (w *WrappedServerStream) Context() context.Context
Context returns the wrapper's WrappedContext, overwriting the nested grpc.ServerStream.Context()