Trait redis_driver::SentinelCommands
source · pub trait SentinelCommands {
fn sentinel_get_master_addr_by_name<N>(
&mut self,
master_name: N
) -> PreparedCommand<'_, Self, Option<(String, u16)>>
where
Self: Sized,
N: Into<BulkString>,
{ ... }
fn sentinel_failover<N>(
&mut self,
master_name: N
) -> PreparedCommand<'_, Self, ()>
where
Self: Sized,
N: Into<BulkString>,
{ ... }
}
Expand description
Provided Methods
sourcefn sentinel_get_master_addr_by_name<N>(
&mut self,
master_name: N
) -> PreparedCommand<'_, Self, Option<(String, u16)>>where
Self: Sized,
N: Into<BulkString>,
fn sentinel_get_master_addr_by_name<N>(
&mut self,
master_name: N
) -> PreparedCommand<'_, Self, Option<(String, u16)>>where
Self: Sized,
N: Into<BulkString>,
Return the ip and port number of the master with that name.
If a failover is in progress or terminated successfully for this master, it returns the address and port of the promoted replica.
Return
None
if sentinel does not know this master- A tuple made up of
- The IP of the master
- The port of the master
sourcefn sentinel_failover<N>(
&mut self,
master_name: N
) -> PreparedCommand<'_, Self, ()>where
Self: Sized,
N: Into<BulkString>,
fn sentinel_failover<N>(
&mut self,
master_name: N
) -> PreparedCommand<'_, Self, ()>where
Self: Sized,
N: Into<BulkString>,
Force a failover as if the master was not reachable, and without asking for agreement to other Sentinels (however a new version of the configuration will be published so that the other Sentinels will update their configurations).