Update go dependencies
This commit is contained in:
parent
2586542608
commit
6db1ed390d
64 changed files with 13497 additions and 11319 deletions
2
vendor/k8s.io/apiserver/pkg/server/healthz/doc.go
generated
vendored
2
vendor/k8s.io/apiserver/pkg/server/healthz/doc.go
generated
vendored
|
|
@ -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"
|
||||
|
|
|
|||
18
vendor/k8s.io/apiserver/pkg/server/healthz/healthz.go
generated
vendored
18
vendor/k8s.io/apiserver/pkg/server/healthz/healthz.go
generated
vendored
|
|
@ -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{}
|
||||
|
||||
|
|
@ -102,6 +93,14 @@ func InstallHandler(mux mux, checks ...HealthzChecker) {
|
|||
InstallPathHandler(mux, "/healthz", checks...)
|
||||
}
|
||||
|
||||
// InstallReadyzHandler registers handlers for health checking on the path
|
||||
// "/readyz" to mux. *All handlers* for mux must be specified in
|
||||
// exactly one call to InstallHandler. Calling InstallHandler more
|
||||
// than once for the same mux will result in a panic.
|
||||
func InstallReadyzHandler(mux mux, checks ...HealthzChecker) {
|
||||
InstallPathHandler(mux, "/readyz", checks...)
|
||||
}
|
||||
|
||||
// InstallPathHandler registers handlers for health checking on
|
||||
// a specific path to mux. *All handlers* for the path must be
|
||||
// specified in exactly one call to InstallPathHandler. Calling
|
||||
|
|
@ -181,6 +180,7 @@ func handleRootHealthz(checks ...HealthzChecker) http.HandlerFunc {
|
|||
}
|
||||
// always be verbose on failure
|
||||
if failed {
|
||||
klog.V(2).Infof("%vhealthz check failed", verboseOut.String())
|
||||
http.Error(w, fmt.Sprintf("%vhealthz check failed", verboseOut.String()), http.StatusInternalServerError)
|
||||
return
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue