Function mark_component_starting
pub fn mark_component_starting(component: &str)Expand description
Register the component as present but not yet proven healthy.
Distinct from both ok and error: the component exists and has not
failed, but nothing has succeeded for its current incarnation. Callers use
this when they know a component is running and know they have no evidence it
works.
Two things make this more than a no-op, because the registry only creates an entry when a mutation reaches it:
- On first call the entry is created, so the component appears in
snapshotasstartinginstead of being absent from/healthaltogether. - On a later call it invalidates a
last_okleft by a previous incarnation. The registry lives in a process-wideOnceLockand outlives a daemon reload, so a replacement component reusing the same name would otherwise inherit its predecessor’sokand keep reporting healthy while it has never once succeeded.
last_error is deliberately preserved: erasing a recorded failure is how
a status becomes misleading, and “starting” is not evidence that a prior
error has been resolved. restart_count is untouched.