Skip to main content

Crate stipping

Crate stipping 

Source
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§

StopConfirmation
Stateful coordinator for the stop-confirmation principle.
StopEvent
One accepted transition in insertion order.

Enums§

Observation
Observation supplied after stop intent has been confirmed.
StopAction
Operation attempted on the state machine.
StopError
Invalid transition, missing description, or failed stop observation.
StopEventKind
Kind of an accepted audit event.
StopState
Current phase of a stop-confirmation workflow.