Documentation
¶
Overview ¶
Package metrics provides a wrapper around of metrics for grpc.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(metrics *Server)
Option sets up a metrics server.
func WithAddrAssigned ¶
func WithAddrAssigned() Option
WithAddrAssigned sets service to ask for listener assigned address. Mainly used when the port to the listener is assigned dynamically.
func WithListener ¶
WithListener sets the listener. Metrics server does not need to start a new one.
type Server ¶
type Server struct { AddrAssigned chan string // contains filtered or unexported fields }
Server is a wrapper around http.Server for a metrics.
func NewMetricsService ¶
NewMetricsService creates an instance of metrics service.
func (*Server) ServerMetrics ¶
func (s *Server) ServerMetrics() *grpcPrometheus.ServerMetrics
ServerMetrics returns the grpc server metrics.
func (*Server) WithShutdownSignal ¶
func (s *Server) WithShutdownSignal(shutdown <-chan struct{}, done chan<- struct{}) servicing.Service
WithShutdownSignal adds channels to wait for shutdown and to report shutdown finished.
Click to show internal directories.
Click to hide internal directories.