Documentation ¶
Overview ¶
Package cloudmonitoring provides primitives for Cloud Monitoring integration.
Index ¶
- type MetricMiddleware
- func (m *MetricMiddleware) GRPCStreamServerInterceptor(srv interface{}, ss grpc.ServerStream, info *grpc.StreamServerInfo, ...) (err error)
- func (m *MetricMiddleware) GRPCUnaryClientInterceptor(ctx context.Context, fullMethod string, request interface{}, ...) error
- func (m *MetricMiddleware) GRPCUnaryServerInterceptor(ctx context.Context, request interface{}, info *grpc.UnaryServerInfo, ...) (resp interface{}, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MetricMiddleware ¶ added in v0.19.0
type MetricMiddleware struct {
// contains filtered or unexported fields
}
func NewMetricMiddleware ¶ added in v0.19.0
func NewMetricMiddleware() (MetricMiddleware, error)
func (*MetricMiddleware) GRPCStreamServerInterceptor ¶ added in v0.41.0
func (m *MetricMiddleware) GRPCStreamServerInterceptor( srv interface{}, ss grpc.ServerStream, info *grpc.StreamServerInfo, handler grpc.StreamHandler, ) (err error)
GRPCStreamServerInterceptor implements grpc.UnaryServerInterceptor and emits metrics for request count and request duration when a gRPC server receives streaming requests.
func (*MetricMiddleware) GRPCUnaryClientInterceptor ¶ added in v0.19.0
func (m *MetricMiddleware) GRPCUnaryClientInterceptor( ctx context.Context, fullMethod string, request interface{}, response interface{}, cc *grpc.ClientConn, invoker grpc.UnaryInvoker, opts ...grpc.CallOption, ) error
GRPCUnaryClientInterceptor provides request logging as a grpc.UnaryClientInterceptor.
func (*MetricMiddleware) GRPCUnaryServerInterceptor ¶ added in v0.19.0
func (m *MetricMiddleware) GRPCUnaryServerInterceptor( ctx context.Context, request interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler, ) (resp interface{}, err error)
GRPCUnaryServerInterceptor implements grpc.UnaryServerInterceptor and emits metrics for request count and request duration when a gRPC server receives requests.
Click to show internal directories.
Click to hide internal directories.