health

package
v1.75.2 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2025 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OK = "ok"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ExecProbe

type ExecProbe struct {
	Command    string `yaml:"command,omitempty"`
	WorkingDir string `yaml:"working_dir,omitempty"`
}

type HttpProbe

type HttpProbe struct {
	Host       string            `yaml:"host,omitempty"`
	Path       string            `yaml:"path,omitempty"`
	Scheme     string            `yaml:"scheme,omitempty"`
	Port       string            `yaml:"port,omitempty"`
	NumPort    int               `yaml:"num_port,omitempty"`
	Headers    map[string]string `yaml:"headers,omitempty"`
	StatusCode int               `yaml:"status_code,omitempty"`
}

type Probe

type Probe struct {
	Exec             *ExecProbe `yaml:"exec,omitempty"`
	HttpGet          *HttpProbe `yaml:"http_get,omitempty"`
	InitialDelay     int        `yaml:"initial_delay_seconds,omitempty"`
	PeriodSeconds    int        `yaml:"period_seconds,omitempty"`
	TimeoutSeconds   int        `yaml:"timeout_seconds,omitempty"`
	SuccessThreshold int        `yaml:"success_threshold,omitempty"`
	FailureThreshold int        `yaml:"failure_threshold,omitempty"`
}

func (*Probe) ValidateAndSetDefaults added in v1.27.0

func (p *Probe) ValidateAndSetDefaults()

type Prober

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

func New

func New(name string, probe Probe, env []string, onCheckEnd func(bool, bool, string, interface{})) (*Prober, error)

func (*Prober) Start

func (p *Prober) Start()

func (*Prober) Stop

func (p *Prober) Stop()

Jump to

Keyboard shortcuts

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