Skip to content

Commit

Permalink
chore: move ready under loki
Browse files Browse the repository at this point in the history
  • Loading branch information
shuiyisong committed Dec 9, 2024
1 parent a6173ec commit b1f9d84
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
17 changes: 8 additions & 9 deletions src/servers/src/http.rs
Original file line number Diff line number Diff line change
Expand Up @@ -638,15 +638,10 @@ impl HttpServer {
router.clone()
};

router = router
.route(
"/health",
routing::get(handler::health).post(handler::health),
)
.route(
"/ready",
routing::get(handler::health).post(handler::health),
);
router = router.route(
"/health",
routing::get(handler::health).post(handler::health),
);

router = router.route("/status", routing::get(handler::status));

Expand Down Expand Up @@ -728,6 +723,10 @@ impl HttpServer {

fn route_loki<S>(log_state: LogState) -> Router<S> {
Router::new()
.route(
"/ready",
routing::get(handler::health).post(handler::health),
)
.route("/api/v1/push", routing::post(event::loki_ingest))
.with_state(log_state)
}
Expand Down
2 changes: 1 addition & 1 deletion tests-integration/tests/http.rs
Original file line number Diff line number Diff line change
Expand Up @@ -776,7 +776,7 @@ pub async fn test_health_api(store_type: StorageType) {
}

health_api(&client, "/health").await;
health_api(&client, "/ready").await;
health_api(&client, "/v1/loki/ready").await;
}

pub async fn test_status_api(store_type: StorageType) {
Expand Down

0 comments on commit b1f9d84

Please sign in to comment.