pub async fn health_check() -> impl ResponderExpand description
Health check endpoint.
Simple endpoint that returns 200 OK if the service is running.
Does not check pool health - use readiness_check for that.
§Endpoint
GET /health§Response (200 OK)
{
"status": "healthy",
"service": "html2pdf-api"
}§Use Cases
- Kubernetes liveness probe
- Load balancer health check
- Uptime monitoring
§Kubernetes Example
livenessProbe:
httpGet:
path: /health
port: 8080
initialDelaySeconds: 10
periodSeconds: 30§Usage in App
ⓘ
App::new()
.route("/health", web::get().to(health_check))