Protocol-pluggable "poll until healthy" primitive, with backoff.
Split out of yah-qed (where it backed StepKind::WaitFor, R513-F3 /
W207 Gap #5) so it can be depended on without pulling in qed's scheduler
stack (task-runs, velveteen, …) — a caller that only wants "wait for
this thing to materialize" (a network endpoint, an npm publish landing, a
DB row appearing) should not need a CI-pipeline engine to get it.
Three dependency-free probes (no HTTP client / TLS stack — that matters for qed's musl-static build):
- http — plaintext HTTP/1.1
GETover a raw [tokio::net::TcpStream]. Healthy on 2xx/3xx, or an exact match toexpect_status. No TLS in v1; anhttps://target should useProbe::Shell(e.g.curl -fsS ...) instead of pulling a TLS stack into every caller. - tcp — bare connect to
host:port. Healthy the moment it accepts. - shell —
sh -c <command>. Healthy on exit 0. The escape hatch for anything the other two can't express (HTTPS, a CLI query, a DB check).
[poll_until] owns the deadline/backoff scheduling and attempt callback;
callers only supply a [Probe] and a [BackoffConfig].