pub(crate) async fn healthyz(__arg0: State<Arc<AppState>>) -> impl IntoResponseExpand description
Check whether the node is healthy.
Healthy means that the node is running and has at least minimal connectivity.
ยงBehavior
Both conditions must be true for 200 OK:
- Node must be in Running state (
HoprState::Running) - Network must be minimally connected (
Health::Orange,Health::Yellow, orHealth::Green)
Returns 412 PRECONDITION_FAILED if either condition is false:
- Node not running (any other
HoprState) - Node running but network not minimally connected (
Health::UnknownorHealth::Red)
This endpoint is used by Kubernetes liveness probes to determine if the pod should be restarted.
Note: Currently healthyz and readyz have identical behavior.