admin api: convert new fields to Option<T>

This commit is contained in:
Alex Auvolat
2026-03-06 16:54:45 +01:00
committed by Alex
parent de10dc43d5
commit 4566020360
5 changed files with 102 additions and 53 deletions

View File

@@ -27,7 +27,7 @@ impl RequestHandler for LocalGetNodeInfoRequest {
Ok(LocalGetNodeInfoResponse {
node_id: hex::encode(garage.system.id),
hostname,
hostname: Some(hostname),
garage_version: garage_util::version::garage_version().to_string(),
garage_features: garage_util::version::garage_features()
.map(|features| features.iter().map(ToString::to_string).collect()),
@@ -146,8 +146,8 @@ impl RequestHandler for LocalGetNodeStatisticsRequest {
Ok(LocalGetNodeStatisticsResponse {
freeform: ret,
table_stats,
block_manager_stats,
table_stats: Some(table_stats),
block_manager_stats: Some(block_manager_stats),
})
}
}