Expand description
Graceful shutdown — signal handling and session draining.
Production coordinators must handle SIGTERM/SIGINT by draining active sessions within a timeout, then cleanly shutting down.
§Usage
ⓘ
use confium_tc::shutdown::ShutdownSignal;
use std::time::Duration;
let signal = ShutdownSignal::new();
signal.install(Duration::from_secs(30));
// In the main loop:
while !signal.is_triggered() {
// handle requests
}Structs§
- Shutdown
Coordinator - Manages the shutdown drain process for a coordinator.
- Shutdown
Signal - A signal that tracks whether shutdown has been requested.
Enums§
- Drain
Result - Result of the shutdown drain process.