pub struct RedisSentinelTemplate { /* private fields */ }
Expand description
Redis Sentinel template for high availability setup
Implementations§
Source§impl RedisSentinelTemplate
impl RedisSentinelTemplate
Sourcepub fn master_name(self, name: impl Into<String>) -> Self
pub fn master_name(self, name: impl Into<String>) -> Self
Set the master name for Sentinel monitoring
Sourcepub fn num_replicas(self, num: usize) -> Self
pub fn num_replicas(self, num: usize) -> Self
Set the number of Redis replicas
Sourcepub fn num_sentinels(self, num: usize) -> Self
pub fn num_sentinels(self, num: usize) -> Self
Set the number of Sentinel instances
Sourcepub fn master_port(self, port: u16) -> Self
pub fn master_port(self, port: u16) -> Self
Set the Redis master port
Sourcepub fn replica_port_base(self, port: u16) -> Self
pub fn replica_port_base(self, port: u16) -> Self
Set the base port for replicas (will increment for each replica)
Sourcepub fn sentinel_port_base(self, port: u16) -> Self
pub fn sentinel_port_base(self, port: u16) -> Self
Set the base port for Sentinels (will increment for each Sentinel)
Sourcepub fn password(self, password: impl Into<String>) -> Self
pub fn password(self, password: impl Into<String>) -> Self
Set Redis password for authentication
Sourcepub fn down_after_milliseconds(self, ms: u32) -> Self
pub fn down_after_milliseconds(self, ms: u32) -> Self
Set the time in milliseconds before master is considered down
Sourcepub fn failover_timeout(self, ms: u32) -> Self
pub fn failover_timeout(self, ms: u32) -> Self
Set the failover timeout in milliseconds
Sourcepub fn parallel_syncs(self, num: u32) -> Self
pub fn parallel_syncs(self, num: u32) -> Self
Set the number of parallel syncs during failover
Sourcepub fn with_persistence(self) -> Self
pub fn with_persistence(self) -> Self
Enable persistence for Redis instances
Sourcepub fn custom_redis_image(
self,
image: impl Into<String>,
tag: impl Into<String>,
) -> Self
pub fn custom_redis_image( self, image: impl Into<String>, tag: impl Into<String>, ) -> Self
Use a custom Redis image and tag
Auto Trait Implementations§
impl Freeze for RedisSentinelTemplate
impl RefUnwindSafe for RedisSentinelTemplate
impl Send for RedisSentinelTemplate
impl Sync for RedisSentinelTemplate
impl Unpin for RedisSentinelTemplate
impl UnwindSafe for RedisSentinelTemplate
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