From 1ae0533f2dae98bc43043bfb43fb668972c3240d Mon Sep 17 00:00:00 2001 From: Markus Brueckner Date: Thu, 29 Jan 2026 18:22:10 +0100 Subject: [PATCH] add version info to health endpoint --- src/handlers.rs | 2 ++ 1 file changed, 2 insertions(+) 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),