Skip to main content

readiness_response

Function readiness_response 

Source
pub fn readiness_response<E: Display>(result: Result<(), E>) -> Response
Expand description

Readiness response from a dependency check: 200 OK with {"status": "ready"} on success, 503 Service Unavailable with the failure reason on error. Unlike liveness, readiness probes an upstream dependency so orchestrators only route traffic once the service can actually serve it.