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 ¶
func SimpleHandler(w http.ResponseWriter, _ *http.Request)
SimpleHandler returns a simple http handler for health checks.
Types ¶
type HTTPProbe ¶
type HTTPProbe struct { URL string Protocol ProtocolType }
HTTPProbe is a type used to represent an HTTP or HTTPS probe
type MockProbes ¶
type MockProbes struct {
// contains filtered or unexported fields
}
MockProbes is a mock of Probes interface.
func NewMockProbes ¶
func NewMockProbes(ctrl *gomock.Controller) *MockProbes
NewMockProbes creates a new mock instance.
func (*MockProbes) EXPECT ¶
func (m *MockProbes) EXPECT() *MockProbesMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockProbesMockRecorder ¶
type MockProbesMockRecorder struct {
// contains filtered or unexported fields
}
MockProbesMockRecorder is the mock recorder for MockProbes.
func (*MockProbesMockRecorder) GetID ¶
func (mr *MockProbesMockRecorder) GetID() *gomock.Call
GetID indicates an expected call of GetID.
func (*MockProbesMockRecorder) Liveness ¶
func (mr *MockProbesMockRecorder) Liveness() *gomock.Call
Liveness indicates an expected call of Liveness.
func (*MockProbesMockRecorder) Readiness ¶
func (mr *MockProbesMockRecorder) Readiness() *gomock.Call
Readiness indicates an expected call of Readiness.
type ProtocolType ¶
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" )