cloudmonitoring

package
v0.60.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 22, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package cloudmonitoring provides primitives for Cloud Monitoring integration.

Index

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL