hyperlane-plugin-etag 23.3.2

An opt-in automatic ETag and HTTP conditional request plugin for the Hyperlane framework providing strong/weak XxHash3_64 entity tags, zero-allocation If-None-Match 304 Not Modified, and If-Match 412 Precondition Failed optimistic concurrency.
Documentation

hyperlane-plugin-etag

Automatic Strong/Weak ETag & HTTP Conditional Request Plugin

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

Workspace Overview · Plugin Catalog · API Docs


Overview

hyperlane-plugin-etag automates entity tag generation and RFC 9110 conditional request evaluation (304 Not Modified and 412 Precondition Failed) for hyperlane endpoints (hook order -72 / -58). It is opt-in and transparent (Status::Continue) when unconfigured.

Installation

cargo add hyperlane-plugin-etag

Usage

use hyperlane_plugin_etag::{EtagConfig, EtagPlugin};

fn setup_etag() {
    EtagPlugin::init(EtagConfig::default());
}

Verification

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 file for details.

Contact

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