Documentation
¶
Index ¶
- func Chain(interceptors ...UnaryServerInterceptor) grpc.UnaryServerInterceptor
- func StreamChain(interceptors ...grpc.StreamServerInterceptor) grpc.StreamServerInterceptor
- func StreamLogging(log *zap.Logger) grpc.StreamServerInterceptor
- func StreamMetrics() grpc.StreamServerInterceptor
- func StreamRecovery() grpc.StreamServerInterceptor
- type UnaryServerInterceptor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Chain ¶
func Chain(interceptors ...UnaryServerInterceptor) grpc.UnaryServerInterceptor
func StreamChain ¶ added in v0.2.5
func StreamChain(interceptors ...grpc.StreamServerInterceptor) grpc.StreamServerInterceptor
StreamChain 构建流式拦截器调用链
func StreamLogging ¶ added in v0.2.5
func StreamLogging(log *zap.Logger) grpc.StreamServerInterceptor
StreamLogging 流式请求日志中间件
func StreamMetrics ¶ added in v0.2.5
func StreamMetrics() grpc.StreamServerInterceptor
StreamMetrics 流式请求指标中间件
func StreamRecovery ¶ added in v0.2.5
func StreamRecovery() grpc.StreamServerInterceptor
StreamRecovery 流式请求panic恢复中间件
Types ¶
type UnaryServerInterceptor ¶
type UnaryServerInterceptor func(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error)
func Logging ¶
func Logging(log *zap.Logger) UnaryServerInterceptor
func Metrics ¶
func Metrics() UnaryServerInterceptor
func Recovery ¶
func Recovery() UnaryServerInterceptor
Click to show internal directories.
Click to hide internal directories.