health

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2026 License: MIT Imports: 6 Imported by: 1 module, 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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DatabaseHealthClient added in v0.13.0

type DatabaseHealthClient interface {
	Health(context.Context) error
}

DatabaseHealthClient is the minimal database capability required by health checks.

type HealthChecker

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

HealthChecker manages health checks for configured VDBs

func NewHealthChecker

func NewHealthChecker(version string, timeout time.Duration) *HealthChecker

NewHealthChecker creates a new health checker

func (*HealthChecker) CheckHealth

func (hc *HealthChecker) CheckHealth(ctx context.Context) *HealthStatus

CheckHealth checks the health of all registered databases

func (*HealthChecker) HealthzHandler

func (hc *HealthChecker) HealthzHandler() http.HandlerFunc

HealthzHandler returns an HTTP handler for /healthz endpoint

func (*HealthChecker) ReadyzHandler

func (hc *HealthChecker) ReadyzHandler() http.HandlerFunc

ReadyzHandler returns an HTTP handler for /readyz endpoint This is similar to /healthz but can have different logic for Kubernetes readiness probes

func (*HealthChecker) RegisterDatabase

func (hc *HealthChecker) RegisterDatabase(name string, client DatabaseHealthClient)

RegisterDatabase registers a VDB client for health checking

type HealthStatus

type HealthStatus struct {
	Status    string            `json:"status"`
	Timestamp int64             `json:"timestamp"`
	Version   string            `json:"version"`
	Databases map[string]string `json:"databases"`
}

HealthStatus represents the overall health status

Jump to

Keyboard shortcuts

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