Documentation
¶
Index ¶
- func ExpVarHandler(path string, h http.Handler) http.Handler
- func HTTPStatsHandler(h http.Handler) http.Handler
- func HealthHandler(h http.Handler) http.Handler
- func MetricsHandler(h http.Handler, r *metrics.Registry) http.Handler
- func NoCache(h http.Handler) http.Handler
- func PrometheusHandler(path string, h http.Handler) http.Handler
- func RecoverHandler(h http.Handler) http.Handler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExpVarHandler ¶
ExpVarHandler returns the expvar HTTP Handler
func HTTPStatsHandler ¶
HTTPStatsHandler is a handler that handles stats of HTTP requests
func HealthHandler ¶
HealthHandler is simple handler for /health endpoint that returns 200 OK status
func MetricsHandler ¶
MetricsHandler is a handler that creates counters for client and server http errors
func NoCache ¶
NoCache is a simple piece of middleware that sets a number of HTTP headers to prevent a router (or subrouter) from being cached by an upstream proxy and/or client.
As per http://wiki.nginx.org/HttpProxyModule - NoCache sets:
Expires: Thu, 01 Jan 1970 00:00:00 UTC Cache-Control: no-cache, private, max-age=0 X-Accel-Expires: 0 Pragma: no-cache (for HTTP/1.0 proxies/clients)
func PrometheusHandler ¶
PrometheusHandler adds default prometheus handler middleware
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.