kubernetes: github.com/erimatnor/kubernetes/pkg/healthz Index | Files

package healthz

import "github.com/erimatnor/kubernetes/pkg/healthz"

Package healthz implements basic http server health checking. Usage:

import _ "healthz" registers a handler on the path '/healthz', that serves 200s


Package Files

doc.go healthz.go

func DefaultHealthz Uses

func DefaultHealthz(checks ...HealthzChecker)

DefaultHealthz installs the default healthz check to the http.DefaultServeMux.

func InstallHandler Uses

func InstallHandler(mux mux, checks ...HealthzChecker)

InstallHandler registers a handler for health checking on the path "/healthz" to mux.

type HealthzChecker Uses

type HealthzChecker interface {
    Name() string
    Check(req *http.Request) error

HealthzChecker is a named healthz check.

var PingHealthz HealthzChecker = ping{}

PingHealthz returns true automatically when checked

func NamedCheck Uses

func NamedCheck(name string, check func(r *http.Request) error) HealthzChecker

NamedCheck returns a health checker for the given name and function.

Package healthz imports 3 packages (graph). Updated 2017-05-11. Refresh now. Tools for package owners.