hyperlane-plugin-shutdown 22.14.0

A graceful shutdown coordinator plugin for the Hyperlane framework providing OS signal arming (SIGINT/SIGTERM), lock-free in-flight request draining, bounded drain timeouts, LIFO async shutdown callbacks, and ServerControlHook integration.
Documentation
1
2
3
4
5
6
7
8
9
10
11
/// Default maximum graceful drain window in milliseconds (30 seconds).
pub const DEFAULT_SHUTDOWN_DRAIN_TIMEOUT_MS: u64 = 30_000;

/// Default per-callback shutdown hook timeout in milliseconds (5 seconds).
pub const DEFAULT_SHUTDOWN_CALLBACK_TIMEOUT_MS: u64 = 5_000;

/// High bit of the packed atomic state word indicating shutdown has been triggered.
pub(crate) const SHUTDOWN_BIT: usize = 1usize << (usize::BITS - 1);

/// Mask extracting the active in-flight guard count from the packed atomic state word.
pub(crate) const IN_FLIGHT_MASK: usize = !SHUTDOWN_BIT;