pub struct Builder { /* private fields */ }
Expand description
Redis backend builder
Implementations§
source§impl Builder
impl Builder
sourcepub fn endpoint(&mut self, endpoint: &str) -> &mut Self
pub fn endpoint(&mut self, endpoint: &str) -> &mut Self
set the network address of redis service.
currently supported schemes:
- no scheme: will be seen as “tcp”
- “tcp” or “redis”: unsecured redis connections
- “unix” or “redis+unix”: unix socket connection
sourcepub fn username(&mut self, username: &str) -> &mut Self
pub fn username(&mut self, username: &str) -> &mut Self
set the username for redis
default: no username
sourcepub fn password(&mut self, password: &str) -> &mut Self
pub fn password(&mut self, password: &str) -> &mut Self
set the password for redis
default: no password
sourcepub fn default_ttl(&mut self, ttl: Duration) -> &mut Self
pub fn default_ttl(&mut self, ttl: Duration) -> &mut Self
Set the default ttl for redis services.
If set, we will specify EX
for write operations.