Skip to content

health

Structs

Functions


Struct

Minimal HTTP server that serves a /healthz readiness probe.

Methods:

  • fn bind(addr: SocketAddr, cancel: CancellationToken, ready: Arc<AtomicBool>) -> Result<Self, std::io::Error> - Creates a new health-check server bound to addr.
  • fn serve(self: Self) - Runs the accept loop until the cancellation token fires.

Trait Implementations:

  • Debug
    • fn fmt(self: &Self, f: & mut $crate::fmt::Formatter) -> $crate::fmt::Result

Function

Mark the health endpoint not ready.

fn mark_not_ready(ready: &std::sync::atomic::AtomicBool)

Function

Mark the health endpoint ready.

fn mark_ready(ready: &std::sync::atomic::AtomicBool)

Function

Shared readiness flag observed by /healthz.

fn readiness_flag() -> std::sync::Arc<std::sync::atomic::AtomicBool>