Expand description
Graceful shutdown gate primitive.
The design is inspired by axum’s server handle pattern (https://github.com/tokio-rs/axum): a sticky shutdown signal, tracked in-flight work, and a graceful drain phase before forced shutdown. This module is not tied to HTTP; it lifts that operational shape into a small runtime primitive that any service loop can use.
Structs§
Enums§
- Error
- Why a
Gaterefused a permit. - Gate
Drain Outcome - Result of waiting for accepted work to leave a
Gate.
Functions§
- create_
gate - Create a gate that automatically initiates graceful shutdown when the token is cancelled.
- default_
acquire_ timeout