chore: add /ready api for health checking (#5124)

* chore: add ready endpoint for health checking

* chore: add test
This commit is contained in:
shuiyisong
2024-12-11 10:56:48 +08:00
committed by GitHub
parent 7c69ca0502
commit 3d1b8c4fac
2 changed files with 26 additions and 16 deletions

View File

@@ -638,10 +638,15 @@ impl HttpServer {
router.clone()
};
router = router.route(
"/health",
routing::get(handler::health).post(handler::health),
);
router = router
.route(
"/health",
routing::get(handler::health).post(handler::health),
)
.route(
"/ready",
routing::get(handler::health).post(handler::health),
);
router = router.route("/status", routing::get(handler::status));