<div align="center">
<img src="https://devhub.vip/pages/docs/img/hyperlane.png" alt="hyperlane-plugin-concurrency logo" height="120">
# hyperlane-plugin-concurrency
**Lock-Free In-Flight Concurrency Limiter & Adaptive Load-Shedding Plugin**
[](https://crates.io/crates/hyperlane-plugin-concurrency)
[](https://docs.rs/hyperlane-plugin-concurrency)
[](https://github.com/hyperlane-dev/hyperlane/actions/workflows/rust.yml)
[](https://www.rust-lang.org)
[](../../LICENSE)
[Workspace Overview](../../README.md) · [Plugin Catalog](../README.md) · [API Docs](https://docs.rs/hyperlane-plugin-concurrency/latest/)
</div>
---
## Overview
`hyperlane-plugin-concurrency` bounds active in-flight requests globally and per route prefix for [`hyperlane`](../../README.md) services (hook order `-108` / `85`). It is opt-in and transparent (`Status::Continue`) when unconfigured.
## Installation
```sh
cargo add hyperlane-plugin-concurrency
```
## Usage
```rust
use hyperlane_plugin_concurrency::{ConcurrencyConfig, ConcurrencyPlugin};
fn setup_concurrency() {
ConcurrencyPlugin::init(ConcurrencyConfig::default());
}
```
## Verification
```sh
cargo run -p hyperlane-cli -- fmt --check
cargo clippy -p hyperlane-plugin-concurrency --all-features --all-targets -- -D warnings
cargo test -p hyperlane-plugin-concurrency --all-features
```
## License
This project is licensed under the MIT License. See the [LICENSE](../../LICENSE) file for details.
## Contact
For inquiries, please contact the author at [root@devhub.vip](mailto:root@devhub.vip).