Documentation ¶
Index ¶
- func SetSlowThreshold(threshold time.Duration)
- func StreamAuthorizeInterceptor(authenticator *auth.Authenticator) grpc.StreamServerInterceptor
- func StreamBreakerInterceptor(srv interface{}, stream grpc.ServerStream, info *grpc.StreamServerInfo, ...) (err error)
- func StreamCrashInterceptor(srv interface{}, stream grpc.ServerStream, info *grpc.StreamServerInfo, ...) (err error)
- func StreamTracingInterceptor(srv interface{}, ss grpc.ServerStream, info *grpc.StreamServerInfo, ...) error
- func UnaryAuthorizeInterceptor(authenticator *auth.Authenticator) grpc.UnaryServerInterceptor
- func UnaryBreakerInterceptor(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, ...) (resp interface{}, err error)
- func UnaryCrashInterceptor(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, ...) (resp interface{}, err error)
- func UnaryPrometheusInterceptor(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, ...) (interface{}, error)
- func UnarySheddingInterceptor(shedder load.Shedder, metrics *stat.Metrics) grpc.UnaryServerInterceptor
- func UnaryStatInterceptor(metrics *stat.Metrics) grpc.UnaryServerInterceptor
- func UnaryTimeoutInterceptor(timeout time.Duration) grpc.UnaryServerInterceptor
- func UnaryTracingInterceptor(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, ...) (interface{}, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetSlowThreshold ¶ added in v1.3.0
SetSlowThreshold sets the slow threshold.
func StreamAuthorizeInterceptor ¶
func StreamAuthorizeInterceptor(authenticator *auth.Authenticator) grpc.StreamServerInterceptor
StreamAuthorizeInterceptor returns a func that uses given authenticator in processing stream requests.
func StreamBreakerInterceptor ¶ added in v1.3.0
func StreamBreakerInterceptor(srv interface{}, stream grpc.ServerStream, info *grpc.StreamServerInfo, handler grpc.StreamHandler) (err error)
StreamBreakerInterceptor is an interceptor that acts as a circuit breaker.
func StreamCrashInterceptor ¶
func StreamCrashInterceptor(srv interface{}, stream grpc.ServerStream, info *grpc.StreamServerInfo, handler grpc.StreamHandler) (err error)
StreamCrashInterceptor catches panics in processing stream requests and recovers.
func StreamTracingInterceptor ¶ added in v1.3.0
func StreamTracingInterceptor(srv interface{}, ss grpc.ServerStream, info *grpc.StreamServerInfo, handler grpc.StreamHandler) error
StreamTracingInterceptor returns a grpc.StreamServerInterceptor for opentelemetry.
func UnaryAuthorizeInterceptor ¶
func UnaryAuthorizeInterceptor(authenticator *auth.Authenticator) grpc.UnaryServerInterceptor
UnaryAuthorizeInterceptor returns a func that uses given authenticator in processing unary requests.
func UnaryBreakerInterceptor ¶ added in v1.3.0
func UnaryBreakerInterceptor(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (resp interface{}, err error)
UnaryBreakerInterceptor is an interceptor that acts as a circuit breaker.
func UnaryCrashInterceptor ¶
func UnaryCrashInterceptor(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (resp interface{}, err error)
UnaryCrashInterceptor catches panics in processing unary requests and recovers.
func UnaryPrometheusInterceptor ¶
func UnaryPrometheusInterceptor(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error)
UnaryPrometheusInterceptor reports the statistics to the prometheus server.
func UnarySheddingInterceptor ¶
func UnarySheddingInterceptor(shedder load.Shedder, metrics *stat.Metrics) grpc.UnaryServerInterceptor
UnarySheddingInterceptor returns a func that does load shedding on processing unary requests.
func UnaryStatInterceptor ¶
func UnaryStatInterceptor(metrics *stat.Metrics) grpc.UnaryServerInterceptor
UnaryStatInterceptor returns a func that uses given metrics to report stats.
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 interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error)
UnaryTracingInterceptor is a grpc.UnaryServerInterceptor for opentelemetry.
Types ¶
This section is empty.