wasmer_config/app/
healthcheck.rs

1#[derive(
2    schemars::JsonSchema, serde::Serialize, serde::Deserialize, PartialEq, Eq, Clone, Debug,
3)]
4pub enum HealthCheckV1 {
5    #[serde(rename = "http")]
6    Http(HealthCheckHttpV1),
7}
8
9/// Health check configuration for http endpoints.
10#[derive(
11    schemars::JsonSchema, serde::Serialize, serde::Deserialize, PartialEq, Eq, Clone, Debug,
12)]
13pub struct HealthCheckHttpV1 {
14    #[serde(flatten)]
15    pub request: super::HttpRequest,
16
17    /// Interval for the health check.
18    ///
19    /// Format: 1s, 5m, 11h, ...
20    ///
21    /// Defaults to 60s.
22    #[serde(skip_serializing_if = "Option::is_none")]
23    pub interval: Option<String>,
24
25    /// Number of retries before the health check is considered unhealthy.
26    ///
27    /// Defaults to 1.
28    #[serde(skip_serializing_if = "Option::is_none")]
29    pub unhealthy_threshold: Option<u32>,
30
31    /// Number of retries before the health check is considered healthy again.
32    ///
33    /// Defaults to 1.
34    #[serde(skip_serializing_if = "Option::is_none")]
35    pub healthy_threshold: Option<u32>,
36}