exercises

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

health.rs (301B)


      1 use axum::Json;
      2 use serde::Serialize;
      3 
      4 #[derive(Serialize)]
      5 pub struct HealthResponse {
      6     status: String,
      7     service: String,
      8 }
      9 
     10 pub async fn health_check() -> Json<HealthResponse> {
     11     Json(HealthResponse {
     12         status: "healthy".to_string(),
     13         service: "otelmart".to_string(),
     14     })
     15 }