pub struct State {
pub pid: u32,
pub commit: String,
pub tree: String,
pub started: u64,
pub snapshot: PathBuf,
pub phase: Phase,
pub step: Option<String>,
pub reason: Option<String>,
pub prestage: bool,
pub signal: Option<i32>,
}Expand description
One rehearsal, as the state file records it.
Fields§
§pid: u32§commit: String§tree: String§started: u64§snapshot: PathBuf§phase: Phase§step: Option<String>What a running worker is doing — preparing the snapshot or
testing it. A key rather than a phase value: an older amont reading
this file ignores a key it does not know, where an unknown phase would
read as no rehearsal at all.
reason: Option<String>Why a rehearsal failed without the gate ever running.
prestage: boolLand’s pre-stage (ADR-0018): a rehearsal that meets it waits for it instead of cancelling it, since land is about to push what it proves.
signal: Option<i32>The signal that stopped its push gate, when one did: no verdict, so a follower reports it interrupted, not failed.
Implementations§
Source§impl State
impl State
Sourcepub fn parse(body: &str) -> Option<State>
pub fn parse(body: &str) -> Option<State>
None for anything this version did not write — including a file
from a future layout — which the callers all treat as “no rehearsal”.
Sourcepub fn alive(&self) -> bool
pub fn alive(&self) -> bool
Still running, and the process is really there. A running record
whose pid is gone is a worker that was killed or crashed before it
could write its verdict.