probes

package
v0.0.1-dev.137 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ExecProber

type ExecProber struct{}

ExecProber implements the Exec health check probe

func (*ExecProber) Execute

func (p *ExecProber) Execute(ctx *ProbeContext) ProbeResult

Execute implements the Prober interface for Exec probes

type HTTPProber

type HTTPProber struct{}

HTTPProber implements the HTTP health check probe

func (*HTTPProber) Execute

func (p *HTTPProber) Execute(ctx *ProbeContext) ProbeResult

Execute implements the Prober interface for HTTP probes

type ProbeContext

type ProbeContext struct {
	// Context for cancellation and timeouts
	Ctx context.Context

	// Logger
	Logger log.Logger

	// Instance being checked
	Instance *types.Instance

	// Probe configuration
	ProbeConfig *types.Probe

	// HTTP client for HTTP probes
	HTTPClient *http.Client

	// Runner provider for exec probes
	RunnerProvider runner.RunnerProvider
}

ProbeContext contains all context needed to execute a probe

type ProbeResult

type ProbeResult struct {
	Success  bool
	Message  string
	Duration time.Duration
}

ProbeResult represents the result of a health check probe

type Prober

type Prober interface {
	// Execute runs the probe and returns the result
	Execute(ctx *ProbeContext) ProbeResult
}

Prober defines the interface for health check probes

func NewProber

func NewProber(probeType string) (Prober, error)

NewProber creates a new probe implementation based on probe type

type TCPProber

type TCPProber struct{}

TCPProber implements the TCP health check probe

func (*TCPProber) Execute

func (p *TCPProber) Execute(ctx *ProbeContext) ProbeResult

Execute implements the Prober interface for TCP probes

Jump to

Keyboard shortcuts

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