Skip to main content

hyperlane_plugin_session/
lib.rs

1//! hyperlane-plugin-session
2//!
3//! High-concurrency sharded session plugin for Hyperlane with pluggable async
4//! [`SessionStore`] traits, optional HMAC-SHA256 signed cookies, dirty-tracked
5//! zero-write reads, and session-fixation ID regeneration.
6
7mod r#const;
8mod r#fn;
9mod r#impl;
10mod r#static;
11mod r#struct;
12mod r#trait;
13mod r#type;
14
15#[cfg(test)]
16#[path = "../tests/mod.rs"]
17mod tests;
18
19pub use {r#const::*, r#fn::*, r#struct::*, r#trait::*, r#type::*};
20
21pub(crate) use r#static::*;
22
23use std::{
24    array::from_fn,
25    collections::HashMap,
26    future::Future,
27    hash::Hasher,
28    pin::Pin,
29    process,
30    str::from_utf8,
31    sync::{
32        Arc, Mutex, MutexGuard, OnceLock, RwLock, RwLockReadGuard, RwLockWriteGuard,
33        atomic::{AtomicBool, AtomicU64, AtomicUsize, Ordering},
34    },
35    time::{Duration, SystemTime, UNIX_EPOCH},
36};
37
38use {
39    hyperlane::{
40        ArcAnySendSync, COOKIE, Context, CookieBuilder, HashMapXxHash3_64, RequestHeadersValue,
41        SET_COOKIE, ServerHook, Status, Stream, XxHash3_64, hash_map_xx_hash3_64,
42    },
43    lombok_macros::*,
44};