Skip to main content

readyz

Function readyz 

Source
pub(crate) async fn readyz(__arg0: State<Arc<AppState>>) -> impl IntoResponse
Expand description

Check whether the node is ready to accept connections.

Ready means that the node is running and has at least minimal connectivity.

ยงBehavior

Both conditions must be true for 200 OK:

  1. Node must be in Running state (HoprState::Running)
  2. Network must be minimally connected (Health::Orange, Health::Yellow, or Health::Green)

Returns 412 PRECONDITION_FAILED if either condition is false:

  • Node not running (any other HoprState)
  • Node running but network not minimally connected (Health::Unknown or Health::Red)

This endpoint is used by Kubernetes readiness probes to determine if the pod should receive traffic.