Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type StatsdMiddleware ¶
type StatsdMiddleware struct { // IP and port of the statsd server. Optional. Default to "127.0.0.1:8125". IpPort string // Prefix added to the metric keys. Optional. Prefix string }
StatsdMiddleware is a Go-Json-Rest Middleware. It sends statistic about the current request/response to a statsd server. It depends on rest.TimerMiddleware and rest.RecorderMiddleware that should be in the wrapped middlewares. The two metrics are in the form: "[<Prefix>.]response.status_code.<StatusCode>": Counter. "[<Prefix>.]response.elasped_time": Timer.
func (*StatsdMiddleware) MiddlewareFunc ¶
func (mw *StatsdMiddleware) MiddlewareFunc(handler rest.HandlerFunc) rest.HandlerFunc
MiddlewareFunc makes StatsdMiddleware implement the rest.Middleware interface.
Click to show internal directories.
Click to hide internal directories.