Documentation ¶
Index ¶
- func MetricUnaryServerInterceptor(serverName string) grpc.UnaryServerInterceptor
- func RateLimitUnaryServerInterceptor(configs map[MethodName]RateLimitConfig) grpc.UnaryServerInterceptor
- func RecoveryUnaryServerInterceptor() grpc.UnaryServerInterceptor
- func TraceUnaryServerInterceptor() grpc.UnaryServerInterceptor
- type MethodName
- type RateLimitConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MetricUnaryServerInterceptor ¶
func MetricUnaryServerInterceptor(serverName string) grpc.UnaryServerInterceptor
记录请求开始的时间,调用原始的处理函数,然后记录请求处理的时间和错误代码
func RateLimitUnaryServerInterceptor ¶
func RateLimitUnaryServerInterceptor(configs map[MethodName]RateLimitConfig) grpc.UnaryServerInterceptor
func RecoveryUnaryServerInterceptor ¶
func RecoveryUnaryServerInterceptor() grpc.UnaryServerInterceptor
func TraceUnaryServerInterceptor ¶
func TraceUnaryServerInterceptor() grpc.UnaryServerInterceptor
Types ¶
type MethodName ¶
type MethodName string
Click to show internal directories.
Click to hide internal directories.