Documentation
¶
Overview ¶
Package probe implements HTTP readiness checking: the controller calls out to a container over HTTP, rather than the container self-reporting health via Docker's own HEALTHCHECK state machine. The app spec's health.readiness/liveness config is modeled on Kubernetes' prober pattern for exactly this reason, the same choice ADR 002's Consequences section already commits to over Coolify's confirmed weaker default (health checking disabled unless the user opts in, gated entirely on Docker's own HEALTHCHECK).
This package implements the readiness half only: waiting for a freshly started container to become ready before an application controller cuts traffic to it or removes the container it's replacing. Liveness (continuously monitoring an already-running container and triggering a restart after repeated failures) is a related but genuinely separate capability, deliberately not built here, see TASKS.md 1.3's notes.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WaitReady ¶
WaitReady polls http://addr+cfg.Path on cfg.Interval, each attempt bounded by cfg.Timeout, until a response in the 2xx range comes back or ctx is done. It returns nil on the first success, or ctx's error (wrapped with the last probe failure reason, if any) once ctx expires.
client is caller-supplied rather than using http.DefaultClient, so callers (and tests) control transport settings and can inject a client pointed at a test server.