Documentation ¶
Overview ¶
Package health implements functionality for readiness and liveness health probes. The probes are served by an HTTP server that exposes HTTP paths to probe on, with this package providing the necessary HTTP handlers to respond to probe requests.
Package health is a generated GoMock package.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LivenessHandler ¶
LivenessHandler returns liveness http handlers for health
func ReadinessHandler ¶
ReadinessHandler returns readiness http handlers for health
func SimpleHandler ¶ added in v1.2.0
func SimpleHandler(w http.ResponseWriter, _ *http.Request)
SimpleHandler returns a simple http handler for health checks.
Types ¶
type HTTPProbe ¶ added in v0.4.0
type HTTPProbe struct { URL string Protocol ProtocolType }
HTTPProbe is a type used to represent an HTTP or HTTPS probe
type MockProbes ¶ added in v0.4.0
type MockProbes struct {
// contains filtered or unexported fields
}
MockProbes is a mock of Probes interface.
func NewMockProbes ¶ added in v0.4.0
func NewMockProbes(ctrl *gomock.Controller) *MockProbes
NewMockProbes creates a new mock instance.
func (*MockProbes) EXPECT ¶ added in v0.4.0
func (m *MockProbes) EXPECT() *MockProbesMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockProbes) GetID ¶ added in v0.4.0
func (m *MockProbes) GetID() string
GetID mocks base method.
func (*MockProbes) Liveness ¶ added in v0.4.0
func (m *MockProbes) Liveness() bool
Liveness mocks base method.
func (*MockProbes) Readiness ¶ added in v0.4.0
func (m *MockProbes) Readiness() bool
Readiness mocks base method.
type MockProbesMockRecorder ¶ added in v0.4.0
type MockProbesMockRecorder struct {
// contains filtered or unexported fields
}
MockProbesMockRecorder is the mock recorder for MockProbes.
func (*MockProbesMockRecorder) GetID ¶ added in v0.4.0
func (mr *MockProbesMockRecorder) GetID() *gomock.Call
GetID indicates an expected call of GetID.
func (*MockProbesMockRecorder) Liveness ¶ added in v0.4.0
func (mr *MockProbesMockRecorder) Liveness() *gomock.Call
Liveness indicates an expected call of Liveness.
func (*MockProbesMockRecorder) Readiness ¶ added in v0.4.0
func (mr *MockProbesMockRecorder) Readiness() *gomock.Call
Readiness indicates an expected call of Readiness.
type ProtocolType ¶ added in v0.4.0
type ProtocolType string
ProtocolType identifies the protocol used for a connection
const ( // ProtocolHTTP means that the protocol used will be http:// ProtocolHTTP ProtocolType = "http" // ProtocolHTTPS means that the protocol used will be https:// ProtocolHTTPS ProtocolType = "https" )