<div align="center">
<img src="https://devhub.vip/pages/docs/img/hyperlane.png" alt="hyperlane-plugin-etag logo" height="120">
# hyperlane-plugin-etag
**Automatic Strong/Weak ETag & HTTP Conditional Request Plugin**
[](https://crates.io/crates/hyperlane-plugin-etag)
[](https://docs.rs/hyperlane-plugin-etag)
[](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-etag/latest/)
</div>
---
## Overview
`hyperlane-plugin-etag` automates entity tag generation and RFC 9110 conditional request evaluation (`304 Not Modified` and `412 Precondition Failed`) for [`hyperlane`](../../README.md) endpoints (hook order `-72` / `-58`). It is opt-in and transparent (`Status::Continue`) when unconfigured.
## Installation
```sh
cargo add hyperlane-plugin-etag
```
## Usage
```rust
use hyperlane_plugin_etag::{EtagConfig, EtagPlugin};
fn setup_etag() {
EtagPlugin::init(EtagConfig::default());
}
```
## Verification
```sh
cargo run -p hyperlane-cli -- fmt --check
cargo clippy -p hyperlane-plugin-etag --all-features --all-targets -- -D warnings
cargo test -p hyperlane-plugin-etag --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).