1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
/*
* Hanzo Cloud API
*
* The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
*
* The version of the OpenAPI document: v1
*
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct HealthReport {
/// Datastore reports whether the shared warehouse client has a live connection. It is load-bearing for the READ path: false is one of the two ways this answers 503.
#[serde(rename = "datastore", skip_serializing_if = "Option::is_none")]
pub datastore: Option<bool>,
/// Lenses is per-lens table availability, probed only when connected — so it is absent from a degraded report, which has nothing to say about tables it could not reach.
#[serde(rename = "lenses", skip_serializing_if = "Option::is_none")]
pub lenses: Option<Box<models::HealthLenses>>,
/// Lost is the count of facts the sink irrecoverably dropped since boot (warehouse.go). It is reported on the DEGRADED report too, and deliberately: a warehouse that is unreachable is exactly when facts start failing their deliveries, so suppressing the number here would hide it precisely when it moves. ANY NON-ZERO VALUE IS AN ALARM — it counts data the endpoint already answered 200 for.
#[serde(rename = "lost", skip_serializing_if = "Option::is_none")]
pub lost: Option<Box<models::Loss>>,
/// Plane reports the event plane — the bus and the stream every accepted event is published to BEFORE any of it reaches the warehouse. It is load-bearing for the WRITE path, and it is here because its absence was a real outage: this endpoint answered 200/ok on warehouse connectivity alone while every POST /v1/event 503'd on a stream that could not bind, so 100% ingest loss was invisible to monitoring. A probe that cannot see the write path cannot report the write path.
#[serde(rename = "plane", skip_serializing_if = "Option::is_none")]
pub plane: Option<Box<models::HealthPlane>>,
/// Reason is the human-readable cause, present only on a degraded report.
#[serde(rename = "reason", skip_serializing_if = "Option::is_none")]
pub reason: Option<String>,
/// Service names the subsystem answering, so a probe aggregating several health endpoints can attribute a degraded one.
#[serde(rename = "service", skip_serializing_if = "Option::is_none")]
pub service: Option<String>,
/// Status is ok or degraded. Degraded is the 503 and means EITHER load-bearing dependency is down — the warehouse this subsystem reads, or the event plane it writes. It is not moved by a missing lens table, which is honest-empty.
#[serde(rename = "status", skip_serializing_if = "Option::is_none")]
pub status: Option<String>,
/// Warehouse names the datastore database every lens reads.
#[serde(rename = "warehouse", skip_serializing_if = "Option::is_none")]
pub warehouse: Option<String>,
}
impl HealthReport {
pub fn new() -> HealthReport {
HealthReport {
datastore: None,
lenses: None,
lost: None,
plane: None,
reason: None,
service: None,
status: None,
warehouse: None,
}
}
}