Trait fred::interfaces::SentinelInterface
source · pub trait SentinelInterface: ClientLike + Sized {
Show 18 methods
// Provided methods
fn ckquorum<R, N>(&self, name: N) -> impl Future<Output = RedisResult<R>>
where R: FromRedis,
N: Into<Str> { ... }
fn flushconfig<R>(&self) -> impl Future<Output = RedisResult<R>>
where R: FromRedis { ... }
fn failover<R, N>(&self, name: N) -> impl Future<Output = RedisResult<R>>
where R: FromRedis,
N: Into<Str> { ... }
fn get_master_addr_by_name<R, N>(
&self,
name: N,
) -> impl Future<Output = RedisResult<R>>
where R: FromRedis,
N: Into<Str> { ... }
fn info_cache<R>(&self) -> impl Future<Output = RedisResult<R>>
where R: FromRedis { ... }
fn master<R, N>(&self, name: N) -> impl Future<Output = RedisResult<R>>
where R: FromRedis,
N: Into<Str> { ... }
fn masters<R>(&self) -> impl Future<Output = RedisResult<R>>
where R: FromRedis { ... }
fn monitor<R, N>(
&self,
name: N,
ip: IpAddr,
port: u16,
quorum: u32,
) -> impl Future<Output = RedisResult<R>>
where R: FromRedis,
N: Into<Str> { ... }
fn myid<R>(&self) -> impl Future<Output = RedisResult<R>>
where R: FromRedis { ... }
fn pending_scripts<R>(&self) -> impl Future<Output = RedisResult<R>>
where R: FromRedis { ... }
fn remove<R, N>(&self, name: N) -> impl Future<Output = RedisResult<R>>
where R: FromRedis,
N: Into<Str> { ... }
fn replicas<R, N>(&self, name: N) -> impl Future<Output = RedisResult<R>>
where R: FromRedis,
N: Into<Str> { ... }
fn sentinels<R, N>(&self, name: N) -> impl Future<Output = RedisResult<R>>
where R: FromRedis,
N: Into<Str> { ... }
fn set<R, N, V>(
&self,
name: N,
args: V,
) -> impl Future<Output = RedisResult<R>>
where R: FromRedis,
N: Into<Str>,
V: TryInto<RedisMap>,
V::Error: Into<RedisError> { ... }
fn simulate_failure<R>(
&self,
kind: SentinelFailureKind,
) -> impl Future<Output = RedisResult<R>>
where R: FromRedis { ... }
fn reset<R, P>(&self, pattern: P) -> impl Future<Output = RedisResult<R>>
where R: FromRedis,
P: Into<Str> { ... }
fn config_get<R, K>(&self, name: K) -> impl Future<Output = RedisResult<R>>
where R: FromRedis,
K: Into<Str> { ... }
fn config_set<R, K, V>(
&self,
name: K,
value: V,
) -> impl Future<Output = RedisResult<R>>
where R: FromRedis,
K: Into<Str>,
V: TryInto<RedisValue>,
V::Error: Into<RedisError> { ... }
}sentinel-client only.Expand description
Functions that implement the sentinel interface.
Provided Methods§
sourcefn ckquorum<R, N>(&self, name: N) -> impl Future<Output = RedisResult<R>>
fn ckquorum<R, N>(&self, name: N) -> impl Future<Output = RedisResult<R>>
Check if the current Sentinel configuration is able to reach the quorum needed to failover a master, and the majority needed to authorize the failover.
sourcefn flushconfig<R>(&self) -> impl Future<Output = RedisResult<R>>where
R: FromRedis,
fn flushconfig<R>(&self) -> impl Future<Output = RedisResult<R>>where
R: FromRedis,
Force Sentinel to rewrite its configuration on disk, including the current Sentinel state.
sourcefn failover<R, N>(&self, name: N) -> impl Future<Output = RedisResult<R>>
fn failover<R, N>(&self, name: N) -> impl Future<Output = RedisResult<R>>
Force a failover as if the master was not reachable, and without asking for agreement to other Sentinels.
sourcefn get_master_addr_by_name<R, N>(
&self,
name: N,
) -> impl Future<Output = RedisResult<R>>
fn get_master_addr_by_name<R, N>( &self, name: N, ) -> impl Future<Output = RedisResult<R>>
Return the ip and port number of the master with that name.
sourcefn info_cache<R>(&self) -> impl Future<Output = RedisResult<R>>where
R: FromRedis,
fn info_cache<R>(&self) -> impl Future<Output = RedisResult<R>>where
R: FromRedis,
Return cached INFO output from masters and replicas.
sourcefn master<R, N>(&self, name: N) -> impl Future<Output = RedisResult<R>>
fn master<R, N>(&self, name: N) -> impl Future<Output = RedisResult<R>>
Show the state and info of the specified master.
sourcefn masters<R>(&self) -> impl Future<Output = RedisResult<R>>where
R: FromRedis,
fn masters<R>(&self) -> impl Future<Output = RedisResult<R>>where
R: FromRedis,
Show a list of monitored masters and their state.
sourcefn monitor<R, N>(
&self,
name: N,
ip: IpAddr,
port: u16,
quorum: u32,
) -> impl Future<Output = RedisResult<R>>
fn monitor<R, N>( &self, name: N, ip: IpAddr, port: u16, quorum: u32, ) -> impl Future<Output = RedisResult<R>>
Start Sentinel’s monitoring.
https://redis.io/topics/sentinel#reconfiguring-sentinel-at-runtime
sourcefn myid<R>(&self) -> impl Future<Output = RedisResult<R>>where
R: FromRedis,
fn myid<R>(&self) -> impl Future<Output = RedisResult<R>>where
R: FromRedis,
Return the ID of the Sentinel instance.
sourcefn pending_scripts<R>(&self) -> impl Future<Output = RedisResult<R>>where
R: FromRedis,
fn pending_scripts<R>(&self) -> impl Future<Output = RedisResult<R>>where
R: FromRedis,
This command returns information about pending scripts.
sourcefn remove<R, N>(&self, name: N) -> impl Future<Output = RedisResult<R>>
fn remove<R, N>(&self, name: N) -> impl Future<Output = RedisResult<R>>
Stop Sentinel’s monitoring.
https://redis.io/topics/sentinel#reconfiguring-sentinel-at-runtime
sourcefn replicas<R, N>(&self, name: N) -> impl Future<Output = RedisResult<R>>
fn replicas<R, N>(&self, name: N) -> impl Future<Output = RedisResult<R>>
Show a list of replicas for this master, and their state.
sourcefn sentinels<R, N>(&self, name: N) -> impl Future<Output = RedisResult<R>>
fn sentinels<R, N>(&self, name: N) -> impl Future<Output = RedisResult<R>>
Show a list of sentinel instances for this master, and their state.
sourcefn set<R, N, V>(&self, name: N, args: V) -> impl Future<Output = RedisResult<R>>
fn set<R, N, V>(&self, name: N, args: V) -> impl Future<Output = RedisResult<R>>
Set Sentinel’s monitoring configuration.
https://redis.io/topics/sentinel#reconfiguring-sentinel-at-runtime
sourcefn simulate_failure<R>(
&self,
kind: SentinelFailureKind,
) -> impl Future<Output = RedisResult<R>>where
R: FromRedis,
fn simulate_failure<R>(
&self,
kind: SentinelFailureKind,
) -> impl Future<Output = RedisResult<R>>where
R: FromRedis,
This command simulates different Sentinel crash scenarios.
sourcefn reset<R, P>(&self, pattern: P) -> impl Future<Output = RedisResult<R>>
fn reset<R, P>(&self, pattern: P) -> impl Future<Output = RedisResult<R>>
This command will reset all the masters with matching name.
sourcefn config_get<R, K>(&self, name: K) -> impl Future<Output = RedisResult<R>>
fn config_get<R, K>(&self, name: K) -> impl Future<Output = RedisResult<R>>
Get the current value of a global Sentinel configuration parameter. The specified name may be a wildcard, similar to the Redis CONFIG GET command.
sourcefn config_set<R, K, V>(
&self,
name: K,
value: V,
) -> impl Future<Output = RedisResult<R>>
fn config_set<R, K, V>( &self, name: K, value: V, ) -> impl Future<Output = RedisResult<R>>
Set the value of a global Sentinel configuration parameter.