Documentation
¶
Index ¶
- func NewStreamClientInterceptor(opts ...Option) grpc.StreamClientInterceptor
- func NewStreamServerInterceptor(opts ...Option) grpc.StreamServerInterceptor
- func NewUnaryClientInterceptor(opts ...Option) grpc.UnaryClientInterceptor
- func NewUnaryServerInterceptor(opts ...Option) grpc.UnaryServerInterceptor
- type Option
- func WithStreamClientBlockFallback(...) Option
- func WithStreamClientResourceExtractor(fn func(context.Context, *grpc.StreamDesc, *grpc.ClientConn, string) string) Option
- func WithStreamServerBlockFallback(...) Option
- func WithStreamServerResourceExtractor(fn func(interface{}, grpc.ServerStream, *grpc.StreamServerInfo) string) Option
- func WithUnaryClientBlockFallback(...) Option
- func WithUnaryClientResourceExtractor(fn func(context.Context, string, interface{}, *grpc.ClientConn) string) Option
- func WithUnaryServerBlockFallback(...) Option
- func WithUnaryServerResourceExtractor(fn func(context.Context, interface{}, *grpc.UnaryServerInfo) string) Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewStreamClientInterceptor ¶
func NewStreamClientInterceptor(opts ...Option) grpc.StreamClientInterceptor
NewStreamClientInterceptor creates the stream client interceptor wrapped with Sentinel entry.
func NewStreamServerInterceptor ¶
func NewStreamServerInterceptor(opts ...Option) grpc.StreamServerInterceptor
NewStreamServerInterceptor creates the unary stream interceptor wrapped with Sentinel entry.
func NewUnaryClientInterceptor ¶
func NewUnaryClientInterceptor(opts ...Option) grpc.UnaryClientInterceptor
NewUnaryClientInterceptor creates the unary client interceptor wrapped with Sentinel entry.
func NewUnaryServerInterceptor ¶
func NewUnaryServerInterceptor(opts ...Option) grpc.UnaryServerInterceptor
NewUnaryServerInterceptor creates the unary server interceptor wrapped with Sentinel entry.
Types ¶
type Option ¶
type Option func(*options)
func WithStreamClientBlockFallback ¶
func WithStreamClientBlockFallback(fn func(context.Context, *grpc.StreamDesc, *grpc.ClientConn, string, *base.BlockError) (grpc.ClientStream, error)) Option
WithStreamClientBlockFallback sets the block fallback handler of stream client request.
func WithStreamClientResourceExtractor ¶
func WithStreamClientResourceExtractor(fn func(context.Context, *grpc.StreamDesc, *grpc.ClientConn, string) string) Option
WithStreamClientResourceExtractor sets the resource extractor of stream client request.
func WithStreamServerBlockFallback ¶
func WithStreamServerBlockFallback(fn func(interface{}, grpc.ServerStream, *grpc.StreamServerInfo, *base.BlockError) error) Option
WithStreamServerBlockFallback sets the block fallback handler of stream server request.
func WithStreamServerResourceExtractor ¶
func WithStreamServerResourceExtractor(fn func(interface{}, grpc.ServerStream, *grpc.StreamServerInfo) string) Option
WithStreamServerResourceExtractor sets the resource extractor of stream server request.
func WithUnaryClientBlockFallback ¶
func WithUnaryClientBlockFallback(fn func(context.Context, string, interface{}, *grpc.ClientConn, *base.BlockError) error) Option
WithUnaryClientBlockFallback sets the block fallback handler of unary client request. The second string parameter is the full method name of current invocation.
func WithUnaryClientResourceExtractor ¶
func WithUnaryClientResourceExtractor(fn func(context.Context, string, interface{}, *grpc.ClientConn) string) Option
WithUnaryClientResourceExtractor sets the resource extractor of unary client request. The second string parameter is the full method name of current invocation.
func WithUnaryServerBlockFallback ¶
func WithUnaryServerBlockFallback(fn func(context.Context, interface{}, *grpc.UnaryServerInfo, *base.BlockError) (interface{}, error)) Option
WithUnaryServerBlockFallback sets the block fallback handler of unary server request.
func WithUnaryServerResourceExtractor ¶
func WithUnaryServerResourceExtractor(fn func(context.Context, interface{}, *grpc.UnaryServerInfo) string) Option
WithUnaryServerResourceExtractor sets the resource extractor of unary server request.