Documentation ¶
Index ¶
Constants ¶
View Source
const ( // IDPathRegex regexp used to swap the {id*} parameters in the path with simply id // supports alphabetic characters and underscores, no dashes IDPathRegex string = "{[a-zA-Z_]*}" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Middleware ¶
type Middleware struct {
// contains filtered or unexported fields
}
Middleware is the monitoring middleware object implementing Prometheus monitoring
func NewMiddleware ¶
func NewMiddleware(monitor MonitorInterface, logger logging.LoggerInterface) *Middleware
NewMiddleware returns a Middleware based on the type of monitor
func (*Middleware) ResponseTime ¶
func (mdw *Middleware) ResponseTime() func(http.Handler) http.Handler
type MonitorInterface ¶
type NoopMonitor ¶ added in v0.12.0
type NoopMonitor struct {
// contains filtered or unexported fields
}
func NewNoopMonitor ¶ added in v0.12.0
func NewNoopMonitor(service string, logger logging.LoggerInterface) *NoopMonitor
func (*NoopMonitor) GetService ¶ added in v0.12.0
func (m *NoopMonitor) GetService() string
func (*NoopMonitor) SetDependencyAvailability ¶ added in v0.12.0
func (m *NoopMonitor) SetDependencyAvailability(map[string]string, float64) error
func (*NoopMonitor) SetResponseTimeMetric ¶ added in v0.12.0
func (m *NoopMonitor) SetResponseTimeMetric(map[string]string, float64) error
Click to show internal directories.
Click to hide internal directories.