Documentation
¶
Overview ¶
Interface definitions
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 ¶
func NewBlueprint ¶
func NewBlueprint() webiface.BlueprintInterface
NewBlueprint returns a new initialized Blueprint object.
Types ¶
type Middleware ¶
type Middleware struct {
// contains filtered or unexported fields
}
Middleware is the monitoring middleware object implementing Prometheus monitoring
func (Middleware) APICount ¶
func (mdw Middleware) APICount() mux.MiddlewareFunc
APICount increments a http_api_count metric on Prometheus
func (Middleware) APITime ¶
func (mdw Middleware) APITime() mux.MiddlewareFunc
APITime sets a http_api_time metric on Prometheus
type MiddlewareInterface ¶
type MiddlewareInterface interface {
APICount() mux.MiddlewareFunc
APITime() mux.MiddlewareFunc
}
MiddlewareInterface
func NewMiddleware ¶
func NewMiddleware(monitor MonitorInterface, service string) MiddlewareInterface
NewMiddleware returns a Middleware based on the type of monitor
type MonitorInterface ¶
type MonitorInterface interface {
GetService() string
GetMetric(metric string) *prometheus.GaugeVec
Incr(metric string, opts map[string]string)
}
MonitorInterface interface
Click to show internal directories.
Click to hide internal directories.