Documentation
¶
Index ¶
- func StreamRecoverInterceptor(srv any, ss grpc.ServerStream, info *grpc.StreamServerInfo, ...) (err error)
- func StreamTracingInterceptor(svr any, ss grpc.ServerStream, info *grpc.StreamServerInfo, ...) error
- func UnaryPrometheusInterceptor(ctx context.Context, req any, info *grpc.UnaryServerInfo, ...) (resp interface{}, err error)
- func UnaryRecoverInterceptor(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, ...) (resp any, err error)
- func UnaryTimeoutInterceptor(timeout time.Duration) grpc.UnaryServerInterceptor
- func UnaryTracingInterceptor(ctx context.Context, req any, info *grpc.UnaryServerInfo, ...) (any, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func StreamRecoverInterceptor ¶
func StreamRecoverInterceptor(srv any, ss grpc.ServerStream, info *grpc.StreamServerInfo, handler grpc.StreamHandler) (err error)
StreamRecoverInterceptor catches panics in processing stream requests and recovers.
func StreamTracingInterceptor ¶
func StreamTracingInterceptor(svr any, ss grpc.ServerStream, info *grpc.StreamServerInfo, handler grpc.StreamHandler) error
StreamTracingInterceptor returns a grpc.StreamServerInterceptor for opentelemetry.
func UnaryPrometheusInterceptor ¶
func UnaryPrometheusInterceptor(ctx context.Context, req any, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (resp interface{}, err error)
func UnaryRecoverInterceptor ¶
func UnaryRecoverInterceptor(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (resp any, err error)
UnaryRecoverInterceptor catches panics in processing unary requests and recovers.
func UnaryTimeoutInterceptor ¶
func UnaryTimeoutInterceptor(timeout time.Duration) grpc.UnaryServerInterceptor
UnaryTimeoutInterceptor returns a func that sets timeout to incoming unary requests. 返回一个函数 为一元请求 设置超时时间
func UnaryTracingInterceptor ¶
func UnaryTracingInterceptor(ctx context.Context, req any, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (any, error)
UnaryTracingInterceptor is a grpc.UnaryServerInterceptor for opentelemetry.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.