Skip to main content

Module shutdown

Module shutdown 

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

ShutdownCoordinator
Manages the shutdown drain process for a coordinator.
ShutdownSignal
A signal that tracks whether shutdown has been requested.

Enums§

DrainResult
Result of the shutdown drain process.