health

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Liveness

func Liveness(w http.ResponseWriter, _ *http.Request)

Liveness handles GET /healthz. It returns 200 as long as the process is running.

func ModuleFlagsSettingsLoadFailed

func ModuleFlagsSettingsLoadFailed() bool

ModuleFlagsSettingsLoadFailed reports whether module flag loading is degraded.

func Readiness

func Readiness(db Pinger) http.HandlerFunc

Readiness returns a handler for GET /readyz. It pings the database and returns 503 if the ping fails.

func SetModuleFlagsSettingsLoadFailure

func SetModuleFlagsSettingsLoadFailure(failed bool)

SetModuleFlagsSettingsLoadFailure marks whether module flag loading is failing. This is process-wide state used by readiness checks.

Types

type Pinger

type Pinger interface {
	Ping(ctx context.Context) error
}

Pinger is satisfied by *pgxpool.Pool.

Jump to

Keyboard shortcuts

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