prober

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2024 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Overview

Package prober is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockProber

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

MockProber is a mock of Prober interface.

func NewMockProber

func NewMockProber(ctrl *gomock.Controller) *MockProber

NewMockProber creates a new mock instance.

func (*MockProber) EXPECT

func (m *MockProber) EXPECT() *MockProberMockRecorder

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockProber) Healthy

func (m *MockProber) Healthy()

Healthy mocks base method.

func (*MockProber) Ready

func (m *MockProber) Ready()

Ready mocks base method.

func (*MockProber) Unhealthy

func (m *MockProber) Unhealthy(err error)

Unhealthy mocks base method.

func (*MockProber) Unready

func (m *MockProber) Unready(err error)

Unready mocks base method.

type MockProberMockRecorder

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

MockProberMockRecorder is the mock recorder for MockProber.

func (*MockProberMockRecorder) Healthy

func (mr *MockProberMockRecorder) Healthy() *gomock.Call

Healthy indicates an expected call of Healthy.

func (*MockProberMockRecorder) Ready

func (mr *MockProberMockRecorder) Ready() *gomock.Call

Ready indicates an expected call of Ready.

func (*MockProberMockRecorder) Unhealthy

func (mr *MockProberMockRecorder) Unhealthy(err any) *gomock.Call

Unhealthy indicates an expected call of Unhealthy.

func (*MockProberMockRecorder) Unready

func (mr *MockProberMockRecorder) Unready(err any) *gomock.Call

Unready indicates an expected call of Unready.

type Prober

type Prober interface {
	Healthy()
	Unhealthy(err error)
	Ready()
	Unready(err error)
}

Prober represents health and readiness status of given component.

From Kubernetes documentation https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/ :

liveness: Many applications running for long periods of time eventually transition to broken states,
(healthy) and cannot recover except by being restarted.
          Kubernetes provides liveness probes to detect and remedy such situations.

readiness: Sometimes, applications are temporarily unable to serve traffic.
(ready)    For example, an application might need to load large data or configuration files during startup,
           or depend on external services after startup. In such cases, you don’t want to kill the application,
           but you don’t want to send it requests either. Kubernetes provides readiness probes to detect
           and mitigate these situations. A pod with containers reporting that they are not ready
           does not receive traffic through Kubernetes Services.

Jump to

Keyboard shortcuts

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