probe

package
v0.28.2 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2026 License: MIT Imports: 12 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

Overview

Package probe implements liveness probe checkers for node health monitoring.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunCmdProbe

func RunCmdProbe(cfg *chain.ProbeConfig, marker selector.Marker, log logger.Logger)

RunCmdProbe runs a cmd probe and updates the entry marker on success/failure. It is shared by chainGroup and hopGroup probe loops to avoid duplicated code.

Types

type CmdProber

type CmdProber struct {
	Command string
	Timeout time.Duration
}

CmdProber runs a shell command to determine node health. Exit 0 = healthy, non-zero (including timeout) = unhealthy.

func (*CmdProber) Probe

func (p *CmdProber) Probe() error

Probe executes the shell command. Returns nil on exit 0, error otherwise.

type HTTPProber

type HTTPProber struct {
	Path           string
	Host           string
	Headers        map[string]string
	ExpectedStatus int
}

HTTPProber performs an HTTP GET request over an established tunnel connection and validates the response status code.

func NewHTTPProber

func NewHTTPProber(cfg *chain.ProbeConfig) *HTTPProber

func (*HTTPProber) Probe

func (p *HTTPProber) Probe(conn net.Conn) error

Probe sends an HTTP/1.1 GET request over conn and returns an error if the response status does not match ExpectedStatus.

Jump to

Keyboard shortcuts

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