pub struct RedisSentinelHandle { /* private fields */ }Expand description
A running Redis Sentinel topology. Stops everything on Drop.
Implementations§
Source§impl RedisSentinelHandle
impl RedisSentinelHandle
Sourcepub fn master_addr(&self) -> String
pub fn master_addr(&self) -> String
The master’s address.
Sourcepub fn sentinel_addrs(&self) -> Vec<String>
pub fn sentinel_addrs(&self) -> Vec<String>
All sentinel addresses.
Sourcepub fn master_name(&self) -> &str
pub fn master_name(&self) -> &str
The monitored master name.
Sourcepub async fn poke(&self) -> Result<HashMap<String, String>>
pub async fn poke(&self) -> Result<HashMap<String, String>>
Query a sentinel for the current master status.
Sourcepub async fn is_healthy(&self) -> bool
pub async fn is_healthy(&self) -> bool
Check if the topology is healthy.
Sourcepub async fn wait_for_healthy(&self, timeout: Duration) -> Result<()>
pub async fn wait_for_healthy(&self, timeout: Duration) -> Result<()>
Wait until the topology is healthy or timeout.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RedisSentinelHandle
impl RefUnwindSafe for RedisSentinelHandle
impl Send for RedisSentinelHandle
impl Sync for RedisSentinelHandle
impl Unpin for RedisSentinelHandle
impl UnsafeUnpin for RedisSentinelHandle
impl UnwindSafe for RedisSentinelHandle
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> 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 more