Skip to main content

readiness_handler

Function readiness_handler 

Source
pub fn readiness_handler(
    registry: Arc<HealthCheckRegistry>,
) -> impl Fn(&RequestContext, &mut Request) -> Pin<Box<dyn Future<Output = Response> + Send>> + Send + Sync + 'static
Expand description

Create a Kubernetes readiness probe handler from a registry.

Runs all checks and returns:

  • 200 OK when the app is ready to serve traffic
  • 503 Service Unavailable when critical checks fail

Kubernetes will stop routing traffic to pods that fail readiness checks.