Skip to content

Commit 18984b5

Browse files
authored
Fila: testing #27 — Add GET /health endpoint for deployment probes
2 parents 99a182a + a9e298c commit 18984b5

2 files changed

Lines changed: 14 additions & 0 deletions

File tree

src/health.rs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
use rapina::prelude::*;
2+
use rapina::schemars;
3+
4+
#[public]
5+
#[get("/health")]
6+
pub async fn health() -> Result<Json<HealthResponse>> {
7+
Ok(Json(HealthResponse { status: "ok" }))
8+
}
9+
10+
#[derive(Serialize, JsonSchema)]
11+
pub struct HealthResponse {
12+
status: &'static str,
13+
}

src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ pub mod dashboard;
44
pub mod entity;
55
pub mod errors;
66
pub mod github;
7+
mod health;
78
mod merge_events;
89
mod pull_requests;
910
pub mod queue;

0 commit comments

Comments
 (0)