hyperlane-plugin-shutdown 23.3.2

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

hyperlane-plugin-shutdown

Graceful Shutdown Coordinator, OS Signal Arming & Request Drain Plugin

Crates.io Version Docs.rs CI Status Rust 2024 License: MIT

Workspace Overview · Plugin Catalog · API Docs


Overview

hyperlane-plugin-shutdown coordinates OS signal handling (SIGINT/SIGTERM), lock-free in-flight request draining, and ordered cleanup callbacks for hyperlane services.

Installation

cargo add hyperlane-plugin-shutdown

Usage

use hyperlane_plugin_shutdown::{ShutdownConfig, ShutdownCoordinator, ShutdownPlugin};

fn setup_shutdown() {
    let coordinator: ShutdownCoordinator = ShutdownCoordinator::new(ShutdownConfig::default());
    ShutdownPlugin::init(coordinator);
}

Verification

cargo run -p hyperlane-cli -- fmt --check
cargo clippy -p hyperlane-plugin-shutdown --all-features --all-targets -- -D warnings
cargo test -p hyperlane-plugin-shutdown --all-features

License

This project is licensed under the MIT License. See the LICENSE file for details.

Contact

For inquiries, please contact the author at root@devhub.vip.