Documentation ¶
Overview ¶
Package httputil is a collection of utilities for net/http handlers
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PublishTrackedConnections ¶
func PublishTrackedConnections(name string)
PublishTrackedConnections sets the name for the published versions of the currently executing requests list
func SlowHandler ¶
func SlowHandler(fn http.HandlerFunc, max time.Duration, cb func(r *http.Request, t time.Duration)) http.HandlerFunc
SlowHandler wraps a http.HandlerFunc and calls cb if the request takes longer than max time to process. The function runs to completion -- slow requests are not aborted.
func TimeHandler ¶
func TimeHandler(fn http.HandlerFunc, cb func(r *http.Request, t time.Duration)) http.HandlerFunc
TimeHandler wraps a http.HandlerFunc and calls cb with the duration.
func TrackConnections ¶
func TrackConnections(fn http.HandlerFunc) http.HandlerFunc
TrackConnections exports via expvar a list of all currently executing requests
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.