Avoid the default server mux
Kubernetes-commit: dd5c8e14fd2a1715be7795c37fb5b92478867494
This commit is contained in:
parent
288bd949c7
commit
b1e85edc1f
|
|
@ -17,5 +17,5 @@ limitations under the License.
|
|||
// Package healthz implements basic http server health checking.
|
||||
// Usage:
|
||||
// import "k8s.io/apiserver/pkg/server/healthz"
|
||||
// healthz.DefaultHealthz()
|
||||
// healthz.InstallHandler(mux)
|
||||
package healthz // import "k8s.io/apiserver/pkg/server/healthz"
|
||||
|
|
|
|||
|
|
@ -37,15 +37,6 @@ type HealthzChecker interface {
|
|||
Check(req *http.Request) error
|
||||
}
|
||||
|
||||
var defaultHealthz = sync.Once{}
|
||||
|
||||
// DefaultHealthz installs the default healthz check to the http.DefaultServeMux.
|
||||
func DefaultHealthz(checks ...HealthzChecker) {
|
||||
defaultHealthz.Do(func() {
|
||||
InstallHandler(http.DefaultServeMux, checks...)
|
||||
})
|
||||
}
|
||||
|
||||
// PingHealthz returns true automatically when checked
|
||||
var PingHealthz HealthzChecker = ping{}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue