diff --git a/src/handlers.rs b/src/handlers.rs index 8df26f4..8af3482 100644 --- a/src/handlers.rs +++ b/src/handlers.rs @@ -99,6 +99,7 @@ pub async fn put_cache_item( #[derive(Serialize)] pub struct HealthStatus { + pub version: &'static str, pub cache_entries: usize, pub cache_size: u64, pub cache_capacity: u64, @@ -123,6 +124,7 @@ pub async fn get_heath_status(app_data: Data, auth: BearerAuth) -> imp let now = SystemTime::now(); if let Ok(shared) = app_data.shared.read() { HttpResponse::Ok().json(HealthStatus { + version: env!("CARGO_PKG_VERSION"), cache_entries: shared.lru_cache.len(), cache_size: shared.stats.cache_size, cache_capacity: app_data.config.max_cache_size.unwrap_or(u64::MAX),