feat: add graceful api shutdown readiness

This commit is contained in:
2026-06-05 11:43:56 +08:00
parent 9ab353926e
commit e5592304a5
19 changed files with 321 additions and 35 deletions

View File

@@ -1,7 +1,12 @@
use axum::{Router, routing::get};
use crate::{health::health_check, state::AppState};
use crate::{
health::{health_check, readiness_check},
state::AppState,
};
pub fn router(_state: AppState) -> Router<AppState> {
Router::new().route("/healthz", get(health_check))
Router::new()
.route("/healthz", get(health_check))
.route("/readyz", get(readiness_check))
}