mirror of
https://github.com/prometheus/prometheus.git
synced 2024-12-26 06:04:05 -08:00
c1682adb2f
* Reload certificates from disk automatically This change bumps github.com/prometheus/common to include https://github.com/prometheus/common/pull/173 Signed-off-by: Simon Pasquier <spasquie@redhat.com> * scrape: close idle connections on reload/stop Signed-off-by: Simon Pasquier <spasquie@redhat.com> * use v0.3.0 tag Signed-off-by: Simon Pasquier <spasquie@redhat.com>
17 lines
428 B
Go
17 lines
428 B
Go
// +build !go1.7
|
|
|
|
package httprouter
|
|
|
|
import "net/http"
|
|
|
|
// Handler is an adapter which allows the usage of an http.Handler as a
|
|
// request handle. With go 1.7+, the Params will be available in the
|
|
// request context under ParamsKey.
|
|
func (r *Router) Handler(method, path string, handler http.Handler) {
|
|
r.Handle(method, path,
|
|
func(w http.ResponseWriter, req *http.Request, _ Params) {
|
|
handler.ServeHTTP(w, req)
|
|
},
|
|
)
|
|
}
|