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    sync::{
31        Arc, Mutex, MutexGuard, OnceLock, RwLock, RwLockReadGuard, RwLockWriteGuard,
32        atomic::{AtomicU64, AtomicUsize, Ordering},
33    },
34    time::{Duration, SystemTime, UNIX_EPOCH},
35};
36
37use {
38    hyperlane::{
39        COOKIE, Context, Cookie, CookieBuilder, Cookies, HashMapXxHash3_64, SET_COOKIE, ServerHook,
40        Status, Stream, XxHash3_64, hash_map_xx_hash3_64,
41    },
42    lombok_macros::*,
43};