use actix_web::{HttpResponse, Responder};
pub async fn liveness_handler() -> impl Responder {
HttpResponse::Ok().json(serde_json::json!({
"status": "alive",
"timestamp": chrono::Utc::now().to_rfc3339()
}))
}
pub async fn readiness_handler() -> impl Responder {
HttpResponse::Ok().json(serde_json::json!({
"status": "ready",
"timestamp": chrono::Utc::now().to_rfc3339()
}))
}
pub trait HealthCheck: Send + Sync {
fn check(&self) -> std::pin::Pin<Box<dyn std::future::Future<Output = bool> + Send + '_>>;
}