pub struct HaKeys { /* private fields */ }Expand description
Redis key generators for HA operations.
Implementations§
Source§impl HaKeys
impl HaKeys
pub fn new(prefix: &str) -> Self
Sourcepub fn leader_lock(&self) -> String
pub fn leader_lock(&self) -> String
Leader election lock key.
Sourcepub fn leader_heartbeat(&self) -> String
pub fn leader_heartbeat(&self) -> String
Leader heartbeat key.
Sourcepub fn rate_limit(&self, identity: &str) -> String
pub fn rate_limit(&self, identity: &str) -> String
Rate limit counter key for an identity.
Sourcepub fn rate_limit_window(&self, identity: &str) -> String
pub fn rate_limit_window(&self, identity: &str) -> String
Rate limit sorted set key for sliding window.
Sourcepub fn audit_stream(&self) -> String
pub fn audit_stream(&self) -> String
Audit replication stream key.
Sourcepub fn session_registry(&self) -> String
pub fn session_registry(&self) -> String
Session registry key (tracks active sessions across nodes).
Sourcepub fn node_registry(&self) -> String
pub fn node_registry(&self) -> String
Node registry key.
Sourcepub fn node_sessions(&self, node_id: &str) -> String
pub fn node_sessions(&self, node_id: &str) -> String
Per-node session count key.
Auto Trait Implementations§
impl Freeze for HaKeys
impl RefUnwindSafe for HaKeys
impl Send for HaKeys
impl Sync for HaKeys
impl Unpin for HaKeys
impl UnsafeUnpin for HaKeys
impl UnwindSafe for HaKeys
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.