mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-30 20:14:49 +00:00
adds defaults to healthcheck severity (#857)
* adds defaults to healthcheck severity * qualify
This commit is contained in:
committed by
Aiden McClelland
parent
a90c3cb3a1
commit
5bda871e00
@@ -74,12 +74,18 @@ pub enum HealthCheckSeverity {
|
|||||||
Critical,
|
Critical,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl Default for HealthCheckSeverity {
|
||||||
|
fn default() -> Self {
|
||||||
|
HealthCheckSeverity::Warning
|
||||||
|
}
|
||||||
|
}
|
||||||
#[derive(Clone, Debug, Deserialize, Serialize)]
|
#[derive(Clone, Debug, Deserialize, Serialize)]
|
||||||
pub struct HealthCheck {
|
pub struct HealthCheck {
|
||||||
pub name: String,
|
pub name: String,
|
||||||
pub description: String,
|
pub description: String,
|
||||||
#[serde(flatten)]
|
#[serde(flatten)]
|
||||||
implementation: ActionImplementation,
|
implementation: ActionImplementation,
|
||||||
|
#[serde(default)]
|
||||||
pub severity: HealthCheckSeverity,
|
pub severity: HealthCheckSeverity,
|
||||||
pub timeout: Option<Duration>,
|
pub timeout: Option<Duration>,
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user