pub fn repository_status(checks: &[HealthCheck]) -> HealthStatusExpand description
The worst status among the checks that describe the repository
(every one whose id is not in PROCESS_DIMENSIONS); ok when there is none.
use majordomus_cli::capability::builtin::health::{repository_status, HealthCheck, HealthStatus};
let check = |id: &str, status| HealthCheck {
id: id.into(),
title: id.into(),
status,
detail: String::new(),
decided_by: String::new(),
evidence: Vec::new(),
findings: Vec::new(),
};
let checks = [check("layer", HealthStatus::Warn), check("mesh", HealthStatus::Unknown)];
assert_eq!(repository_status(&checks), HealthStatus::Warn);