An empty document, ready for its first [`HookHealth::record`].
(now: &str)
| 95 | impl HookHealth { |
| 96 | /// An empty document, ready for its first [`HookHealth::record`]. |
| 97 | pub fn empty(now: &str) -> Self { |
| 98 | Self { |
| 99 | schema_version: HEALTH_SCHEMA_VERSION, |
| 100 | updated_at: now.to_string(), |
| 101 | agents: BTreeMap::new(), |
| 102 | sessions: BTreeMap::new(), |
| 103 | } |
| 104 | } |
| 105 | |
| 106 | /// Fold one dispatch into the record, preserving `last_ok` across a |
| 107 | /// later failure so a hook that has *never* succeeded is |
nothing calls this directly
no outgoing calls
no test coverage detected