pub struct RedisTemplate { /* private fields */ }
Expand description
Redis container template with sensible defaults
Implementations§
Source§impl RedisTemplate
impl RedisTemplate
Sourcepub fn with_persistence(self, volume_name: impl Into<String>) -> Self
pub fn with_persistence(self, volume_name: impl Into<String>) -> Self
Enable persistence with a volume
Sourcepub fn config_file(self, config_path: impl Into<String>) -> Self
pub fn config_file(self, config_path: impl Into<String>) -> Self
Set custom Redis configuration file
Sourcepub fn memory_limit(self, limit: impl Into<String>) -> Self
pub fn memory_limit(self, limit: impl Into<String>) -> Self
Set memory limit for Redis
Sourcepub fn cluster_mode(self) -> Self
pub fn cluster_mode(self) -> Self
Enable Redis cluster mode
Sourcepub fn maxmemory_policy(self, policy: impl Into<String>) -> Self
pub fn maxmemory_policy(self, policy: impl Into<String>) -> Self
Set max memory policy
Sourcepub fn auto_remove(self) -> Self
pub fn auto_remove(self) -> Self
Enable auto-remove when stopped
Sourcepub fn with_redis_stack(self) -> Self
pub fn with_redis_stack(self) -> Self
Use Redis Stack image instead of basic Redis
Trait Implementations§
Source§impl Template for RedisTemplate
impl Template for RedisTemplate
Source§fn config(&self) -> &TemplateConfig
fn config(&self) -> &TemplateConfig
Get the template configuration
Source§fn config_mut(&mut self) -> &mut TemplateConfig
fn config_mut(&mut self) -> &mut TemplateConfig
Get a mutable reference to the configuration
Source§fn build_command(&self) -> RunCommand
fn build_command(&self) -> RunCommand
Build the RunCommand for this template
Source§fn start<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn start<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Start the container with this template
Source§fn stop<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn stop<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Stop the container
Source§fn remove<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn remove<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Remove the container
Source§fn is_running<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn is_running<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Check if the container is running
Auto Trait Implementations§
impl Freeze for RedisTemplate
impl RefUnwindSafe for RedisTemplate
impl Send for RedisTemplate
impl Sync for RedisTemplate
impl Unpin for RedisTemplate
impl UnwindSafe for RedisTemplate
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