Avoid the default server mux

Kubernetes-commit: 0f9623d937a5c5a4b06b405645554fe52822399d
This commit is contained in:
Tim Allclair 2019-05-16 17:31:16 -07:00 committed by Kubernetes Publisher
parent 449339fbe7
commit 0059444fe7
2 changed files with 1 additions and 10 deletions

View File

@ -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"

View File

@ -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{}