Documentation ¶
Index ¶
- Variables
- func DatabaseLoggingStreamServerInterceptor() grpc.StreamServerInterceptor
- func DatabaseLoggingUnaryServerInterceptor() grpc.UnaryServerInterceptor
- func DatabaseStreamServerInterceptor(db *gorm.DB) grpc.StreamServerInterceptor
- func DatabaseUnaryServerInterceptor(db *gorm.DB) grpc.UnaryServerInterceptor
- func LoggerStreamServerInterceptor(logger sdklogger.Logger) grpc.StreamServerInterceptor
- func LoggerUnaryServerInterceptor(logger sdklogger.Logger) grpc.UnaryServerInterceptor
- func MetricsStreamServerInterceptor(metrics sdkmetrics.Metrics) grpc.StreamServerInterceptor
- func MetricsUnaryServerInterceptor(metrics sdkmetrics.Metrics) grpc.UnaryServerInterceptor
- func RecoveryStreamServerInterceptor() grpc.StreamServerInterceptor
- func RecoveryUnaryServerInterceptor() grpc.UnaryServerInterceptor
- func RequestIDStreamServerInterceptor() grpc.StreamServerInterceptor
- func RequestIDUnaryServerInterceptor() grpc.UnaryServerInterceptor
- func TracingStreamClientInterceptor(applicationName string) grpc.StreamClientInterceptor
- func TracingStreamServerInterceptor(applicationName string) grpc.StreamServerInterceptor
- func TracingUnaryClientInterceptor(applicationName string) grpc.UnaryClientInterceptor
- func TracingUnaryServerInterceptor(applicationName string) grpc.UnaryServerInterceptor
Constants ¶
This section is empty.
Variables ¶
var RequestIDKey = "x-request-id"
RequestIDKey is metadata key name for request ID
Functions ¶
func DatabaseLoggingStreamServerInterceptor ¶ added in v1.6.0
func DatabaseLoggingStreamServerInterceptor() grpc.StreamServerInterceptor
DatabaseLoggingStreamServerInterceptor returns a streaming server interceptor. This interceptor extracts the logger from the request context, attaches it to gorm's database connection pool and logs the database queries with their meta-information using the logger.
func DatabaseLoggingUnaryServerInterceptor ¶ added in v1.6.0
func DatabaseLoggingUnaryServerInterceptor() grpc.UnaryServerInterceptor
DatabaseLoggingUnaryServerInterceptor returns a unary server interceptor. This interceptor extracts the logger from the request context, attaches it to gorm's database connection pool and logs the database queries with their meta-information using the logger.
func DatabaseStreamServerInterceptor ¶
func DatabaseStreamServerInterceptor(db *gorm.DB) grpc.StreamServerInterceptor
DatabaseStreamServerInterceptor returns a streaming server interceptor that adds gorm.DB to the context.
func DatabaseUnaryServerInterceptor ¶
func DatabaseUnaryServerInterceptor(db *gorm.DB) grpc.UnaryServerInterceptor
DatabaseUnaryServerInterceptor returns a unary server interceptor that adds gorm.DB to the context.
func LoggerStreamServerInterceptor ¶
func LoggerStreamServerInterceptor(logger sdklogger.Logger) grpc.StreamServerInterceptor
LoggerStreamServerInterceptor returns a streaming server interceptor that adds the sdklogger.Logger to the context.
func LoggerUnaryServerInterceptor ¶
func LoggerUnaryServerInterceptor(logger sdklogger.Logger) grpc.UnaryServerInterceptor
LoggerUnaryServerInterceptor returns a unary server interceptors that adds the sdklogger.Logger to the context.
func MetricsStreamServerInterceptor ¶
func MetricsStreamServerInterceptor(metrics sdkmetrics.Metrics) grpc.StreamServerInterceptor
MetricsStreamServerInterceptor returns a streaming server interceptor that adds sdkmetrics.Metrics to the context.
func MetricsUnaryServerInterceptor ¶
func MetricsUnaryServerInterceptor(metrics sdkmetrics.Metrics) grpc.UnaryServerInterceptor
MetricsUnaryServerInterceptor returns a unary server interceptors that adds sdkmetrics.Metrics to the context.
func RecoveryStreamServerInterceptor ¶ added in v1.34.0
func RecoveryStreamServerInterceptor() grpc.StreamServerInterceptor
RecoveryStreamServerInterceptor returns a streaming server interceptor that recovers from panics, sends a sentry event, log in fatal level and halts the service. IMPORTANT: This interceptor should be the last one in the interceptor chain.
func RecoveryUnaryServerInterceptor ¶ added in v1.34.0
func RecoveryUnaryServerInterceptor() grpc.UnaryServerInterceptor
RecoveryUnaryServerInterceptor returns a unary server interceptor that recovers from panics, sends a sentry event, log in fatal level and halts the service. IMPORTANT: This interceptor should be the last one in the interceptor chain.
func RequestIDStreamServerInterceptor ¶ added in v1.7.0
func RequestIDStreamServerInterceptor() grpc.StreamServerInterceptor
func RequestIDUnaryServerInterceptor ¶ added in v1.7.0
func RequestIDUnaryServerInterceptor() grpc.UnaryServerInterceptor
func TracingStreamClientInterceptor ¶ added in v1.5.0
func TracingStreamClientInterceptor(applicationName string) grpc.StreamClientInterceptor
TracingStreamClientInterceptor returns a stream server interceptor that will trace streaming requests performed by gRPC client.
func TracingStreamServerInterceptor ¶ added in v1.5.0
func TracingStreamServerInterceptor(applicationName string) grpc.StreamServerInterceptor
TracingStreamServerInterceptor returns a stream server interceptor that will trace streaming requests to the given gRPC server.
func TracingUnaryClientInterceptor ¶ added in v1.5.0
func TracingUnaryClientInterceptor(applicationName string) grpc.UnaryClientInterceptor
TracingUnaryClientInterceptor returns a unary client interceptor that will trace requests performed by gRPC client.
func TracingUnaryServerInterceptor ¶ added in v1.5.0
func TracingUnaryServerInterceptor(applicationName string) grpc.UnaryServerInterceptor
TracingUnaryServerInterceptor returns a unary server interceptor that will trace requests to the given gRPC server.
Types ¶
This section is empty.