Expand description
hyperlane-plugin-etag
Opt-in automatic ETag and HTTP conditional request middleware for Hyperlane
supporting strong and weak XxHash3_64 tags, zero-allocation If-None-Match
(304 Not Modified), and If-Match (412 Precondition Failed) optimistic
concurrency checks.
Structs§
- Etag
Config - Configuration for
EtagPlugin. - Etag
Plugin - Precompiled ETag engine backing
EtagRequestHookandEtagResponseHook. - Etag
Request Hook - Opt-in request middleware enforcing
If-Matchpreconditions (412 Precondition Failed). - Etag
Response Hook - Opt-in response middleware generating
ETagheaders and converting matchingIf-None-Matchto304.
Enums§
- Etag
Strength - Strength of automatically generated entity tags.
Constants§
- DEFAULT_
MIN_ ETAG_ BYTES - Default minimum response body length eligible for automatic ETag generation (
0= all 2xx bodies). - DEFAULT_
PRECONDITION_ BODY - Default JSON body emitted when
If-Matchfails (412 Precondition Failed). - DEFAULT_
PRECONDITION_ CONTENT_ TYPE - Default
Content-Typeemitted for412 Precondition Failedrejections.
Traits§
- Etag
Validator - Pluggable current-version ETag lookup used to enforce
If-Matchoptimistic locking on mutating requests.
Functions§
- compute_
etag - Computes a formatted strong or weak ETag string for
body. - hash_
entity_ bytes - Computes a 64-bit
XxHash3_64digest ofbody. - matches_
if_ match_ strong - Evaluates an RFC 9110 §13.1.1
If-Matchheader againstcurrent_etagusing strong comparison.