health

package
v0.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 14, 2019 License: Apache-2.0 Imports: 5 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TCPProbe

func TCPProbe(addr string, socketTimeout time.Duration) error

TCPProbe checks that a TCP socket to the address can be opened. Did not reuse k8s.io/kubernetes/pkg/probe/tcp to not create a dependency on klog.

Types

type State

type State struct {
	// contains filtered or unexported fields
}

State holds state about the current healthiness of the component.

func (*State) DrainHandler added in v0.5.0

func (h *State) DrainHandler() func(_ http.ResponseWriter, _ *http.Request)

DrainHandler constructs a handler that waits until the proxy server is shut down.

func (*State) HealthHandler

func (h *State) HealthHandler(prober func() bool) func(w http.ResponseWriter, r *http.Request)

HealthHandler constructs a handler that returns the current state of the health server.

func (*State) IsAlive

func (h *State) IsAlive() bool

IsAlive returns whether or not the health server is in a known working state currently.

func (*State) IsShuttingDown

func (h *State) IsShuttingDown() bool

IsShuttingDown returns whether or not the health server is currently shutting down.

func (*State) Shutdown added in v0.5.0

func (h *State) Shutdown(drain func())

Shutdown marks the proxy server as no ready and begins its shutdown process. This results in unblocking any connections waiting for drain.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL