Documentation ¶
Index ¶
- func LoggingStreamClientInterceptor(l log.Logger) grpc.StreamClientInterceptor
- func LoggingStreamServerInterceptor(l log.Logger) grpc.StreamServerInterceptor
- func LoggingUnaryClientInterceptor(l log.Logger) grpc.UnaryClientInterceptor
- func LoggingUnaryServerInterceptor(l log.Logger) grpc.UnaryServerInterceptor
- func PrometheusStreamClientInterceptor(ctx context.Context, desc *grpc.StreamDesc, cc *grpc.ClientConn, ...) (grpc.ClientStream, error)
- func PrometheusUnaryClientInterceptor(ctx context.Context, fullMethod string, req, reply any, cc *grpc.ClientConn, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoggingStreamClientInterceptor ¶
func LoggingStreamClientInterceptor(l log.Logger) grpc.StreamClientInterceptor
LoggingStreamClientInterceptor returns a grpc.StreamClientInterceptor that logs errors that appear to come from the go-grpc implementation.
func LoggingStreamServerInterceptor ¶
func LoggingStreamServerInterceptor(l log.Logger) grpc.StreamServerInterceptor
LoggingStreamServerInterceptor returns a grpc.StreamServerInterceptor that logs errors that appear to come from the go-grpc implementation.
func LoggingUnaryClientInterceptor ¶
func LoggingUnaryClientInterceptor(l log.Logger) grpc.UnaryClientInterceptor
LoggingUnaryClientInterceptor returns a grpc.UnaryClientInterceptor that logs errors that appear to come from the go-grpc implementation.
func LoggingUnaryServerInterceptor ¶
func LoggingUnaryServerInterceptor(l log.Logger) grpc.UnaryServerInterceptor
LoggingUnaryServerInterceptor returns a grpc.UnaryServerInterceptor that logs errors that appear to come from the go-grpc implementation.
func PrometheusStreamClientInterceptor ¶
func PrometheusStreamClientInterceptor(ctx context.Context, desc *grpc.StreamDesc, cc *grpc.ClientConn, fullMethod string, streamer grpc.Streamer, opts ...grpc.CallOption) (grpc.ClientStream, error)
PrometheusStreamClientInterceptor returns a grpc.StreamClientInterceptor that observes the result of the RPC and records it as a Prometheus metric ("src_grpc_method_status").
If any errors are encountered during the stream, the first error is recorded. Otherwise, the final status of the stream is recorded.
func PrometheusUnaryClientInterceptor ¶
func PrometheusUnaryClientInterceptor(ctx context.Context, fullMethod string, req, reply any, cc *grpc.ClientConn, invoker grpc.UnaryInvoker, opts ...grpc.CallOption) error
PrometheusUnaryClientInterceptor returns a grpc.UnaryClientInterceptor that observes the result of the RPC and records it as a Prometheus metric ("src_grpc_method_status").
Types ¶
This section is empty.