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(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.
While this can be useful in some scenarios, it is generally advisable to use google.golang.org/grpc.ChainStreamInterceptor directly.
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(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.
While this can be useful in some scenarios, it is generally advisable to use google.golang.org/grpc.ChainUnaryInterceptor directly.
func WithStreamServerChain(interceptors ...grpc.StreamServerInterceptor) grpc.ServerOption
WithStreamServerChain is a grpc.Server config option that accepts multiple stream interceptors. Basically syntactic sugar.
Deprecated: use google.golang.org/grpc.ChainStreamInterceptor instead.
func WithUnaryServerChain(interceptors ...grpc.UnaryServerInterceptor) grpc.ServerOption
Chain creates a single interceptor out of a chain of many interceptors.
WithUnaryServerChain is a grpc.Server config option that accepts multiple unary interceptors. Basically syntactic sugar.
Deprecated: use google.golang.org/grpc.ChainUnaryInterceptor instead.
WrappedServerStream is a thin wrapper around grpc.ServerStream that allows modifying context.
type WrappedServerStream struct { grpc.ServerStream // WrappedContext is the wrapper's own Context. You can assign it. WrappedContext context.Context }
func WrapServerStream(stream grpc.ServerStream) *WrappedServerStream
WrapServerStream returns a ServerStream that has the ability to overwrite context.
func (w *WrappedServerStream) Context() context.Context
Context returns the wrapper's WrappedContext, overwriting the nested grpc.ServerStream.Context()
Name | Synopsis |
---|---|
.. | |
auth | `grpc_auth` a generic server-side auth middleware for gRPC. |
logging | grpc_logging is a "parent" package for gRPC logging middlewares. |
kit | `grpc_kit` is a gRPC logging middleware backed by go-kit loggers |
ctxkit | `ctxkit` is a ctxlogger that is backed by go-kit |
logrus | `grpc_logrus` is a gRPC logging middleware backed by Logrus loggers |
ctxlogrus | `ctxlogrus` is a ctxlogger that is backed by logrus |
settable | grpc_logsettable contains a thread-safe wrapper around grpc-logging infrastructure. |
zap | `grpc_zap` is a gRPC logging middleware backed by ZAP loggers |
ctxzap | `ctxzap` is a ctxlogger that is backed by Zap |
ratelimit | `ratelimit` a generic server-side ratelimit middleware for gRPC. |
recovery | `grpc_recovery` are interceptors that recover from gRPC handler panics. |
retry | `grpc_retry` provides client-side request retry logic for gRPC. |
tags | `grpc_ctxtags` adds a Tag object to the context that can be used by other middleware to add context about a request. |
logrus | |
zap | |
testing | |
gogotestproto | |
testproto | |
tracing | |
opentracing | `grpc_opentracing` adds OpenTracing |
util | |
backoffutils | Backoff Helper Utilities |
metautils | |
validator | `grpc_validator` is a generic request contents validator server-side middleware for gRPC. |