Expand description
Auditable stop confirmation through request, acknowledgement, and observation.
The state machine deliberately separates an accepted stop intent from proof that the subject actually stopped.
use stipping::{Observation, StopConfirmation, StopState};
let mut stop = StopConfirmation::new("batch processor")?;
stop.request_stop("maintenance window")?;
stop.confirm_intent("worker acknowledged cancellation")?;
stop.verify(Observation::stopped("worker exited"))?;
assert_eq!(stop.state(), StopState::StoppedConfirmed);Structs§
- Stop
Confirmation - Stateful coordinator for the stop-confirmation principle.
- Stop
Event - One accepted transition in insertion order.
Enums§
- Observation
- Observation supplied after stop intent has been confirmed.
- Stop
Action - Operation attempted on the state machine.
- Stop
Error - Invalid transition, missing description, or failed stop observation.
- Stop
Event Kind - Kind of an accepted audit event.
- Stop
State - Current phase of a stop-confirmation workflow.