Documentation ¶
Overview ¶
Package metrics provides a variety of wire bindings for the Prometheus client library.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Set = wire.NewSet( ProvideFactory, ProvideInterceptor, ProvideMetricsHandler, ProvideWrapper, prometheus.NewPedanticRegistry, wire.Bind(new(prometheus.Gatherer), new(*prometheus.Registry)), wire.Bind(new(prometheus.Registerer), new(*prometheus.Registry)), )
Set is used by wire.
Functions ¶
func ProvideFactory ¶
func ProvideFactory(r prometheus.Registerer) promauto.Factory
ProvideFactory is called by wire.
Types ¶
type Handler ¶
Handler exports prometheus metrics.
func ProvideMetricsHandler ¶
func ProvideMetricsHandler( l *log.Logger, g prometheus.Gatherer, r prometheus.Registerer, ) Handler
ProvideMetricsHandler is called by wire.
type Interceptor ¶
type Interceptor struct {
// contains filtered or unexported fields
}
Interceptor provides methods for unary and streaming gRPC calls.
func ProvideInterceptor ¶
func ProvideInterceptor( auto promauto.Factory, ) *Interceptor
ProvideInterceptor is called by wire.
func (*Interceptor) Stream ¶
func (i *Interceptor) Stream( srv interface{}, ss grpc.ServerStream, info *grpc.StreamServerInfo, handler grpc.StreamHandler, ) error
Stream wraps a streaming gRPC call.
func (*Interceptor) Unary ¶
func (i *Interceptor) Unary( ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler, ) (interface{}, error)
Unary wraps a unary gRPC call.
Click to show internal directories.
Click to hide internal directories.