probes

package
v1.27.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2025 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Overview

Package probes contains the implementation of startup, liveness and readiness probes

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Checker

type Checker interface {
	IsHealthy(ctx context.Context, w http.ResponseWriter)
}

Checker executes the probe and writes the response to the request

func NewLivenessChecker

func NewLivenessChecker(
	cli client.Client,
	instance *postgres.Instance,
) Checker

NewLivenessChecker creates a new instance of the liveness probe checker

func NewReadinessChecker

func NewReadinessChecker(
	cli client.Client,
	instance *postgres.Instance,
) Checker

NewReadinessChecker creates a new instance of the readiness probe checker

func NewStartupChecker

func NewStartupChecker(
	cli client.Client,
	instance *postgres.Instance,
) Checker

NewStartupChecker creates a new instance of the startup probe checker

type ReplicaLaggingError

type ReplicaLaggingError struct {
	// DetectedLag is the lag that was detected
	DetectedLag uint64

	// ConfiguredLag is the lag as configured in the probe
	ConfiguredLag uint64

	// LatestEndTime is the time of last write-ahead log location reported to
	// origin WAL sender
	LatestEndTime string
}

ReplicaLaggingError is raised when a replica is lagging more than the configured cap

func (*ReplicaLaggingError) Error

func (e *ReplicaLaggingError) Error() string

Jump to

Keyboard shortcuts

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