middleware

package
v0.2.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 16, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL