Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Middleware ¶
type Middleware struct {
// contains filtered or unexported fields
}
Middleware stores the prefix and the statsd client
func NewMiddleware ¶
func NewMiddleware(uri, prefix string) *Middleware
NewMiddleware returns a middleware struct with a configured statsd client
func (Middleware) ServeHTTP ¶
func (m Middleware) ServeHTTP(rw http.ResponseWriter, r *http.Request, next http.HandlerFunc)
func (Middleware) SetFilter ¶
func (m Middleware) SetFilter(f func(string) (bool, string))
SetFilter - filter what should be sent to metrics
func (Middleware) SetGobalMetrics ¶
func (m Middleware) SetGobalMetrics(s string, global bool)
SetGobalMetrics - if global number of req is recorded
Click to show internal directories.
Click to hide internal directories.