pub trait RedisHelpers {
Show 16 methods
// Required methods
fn set_session<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
account_id: &'life1 str,
session_data: &'life2 SessionData,
) -> Pin<Box<dyn Future<Output = Result<(), RedisError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn get_session<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
account_id: &'life1 str,
session_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Option<SessionData>, RedisError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn create_session<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
account_id: &'life1 str,
user_id: &'life2 str,
agent_id: &'life3 str,
ttl_seconds: u64,
) -> Pin<Box<dyn Future<Output = Result<SessionData, RedisError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait;
fn refresh_session<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
account_id: &'life1 str,
session_id: &'life2 str,
ttl_seconds: u64,
) -> Pin<Box<dyn Future<Output = Result<Option<SessionData>, RedisError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn delete_session<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
account_id: &'life1 str,
session_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), RedisError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn get_active_sessions<'life0, 'life1, 'async_trait>(
&'life0 self,
account_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<SessionData>, RedisError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn cleanup_expired_sessions<'life0, 'life1, 'async_trait>(
&'life0 self,
account_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<u32, RedisError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn set_agent_status<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
account_id: &'life1 str,
status: &'life2 AgentStatus,
) -> Pin<Box<dyn Future<Output = Result<(), RedisError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn get_agent_status<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
account_id: &'life1 str,
user_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Option<AgentStatus>, RedisError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn add_connected_agent<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
account_id: &'life1 str,
user_id: &'life2 str,
agent_id: &'life3 str,
ws_connection_id: &'life4 str,
) -> Pin<Box<dyn Future<Output = Result<(), RedisError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait;
fn remove_connected_agent<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
account_id: &'life1 str,
user_id: &'life2 str,
agent_id: &'life3 str,
ws_connection_id: &'life4 str,
) -> Pin<Box<dyn Future<Output = Result<(), RedisError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait;
fn get_connected_agents<'life0, 'life1, 'async_trait>(
&'life0 self,
account_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, RedisError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn queue_add<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
account_id: &'life1 str,
queue_name: &'life2 str,
item: &'life3 str,
priority: f64,
) -> Pin<Box<dyn Future<Output = Result<(), RedisError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait;
fn queue_pop<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
account_id: &'life1 str,
queue_name: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Option<String>, RedisError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn queue_length<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
account_id: &'life1 str,
queue_name: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<usize, RedisError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn publish_account_event<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
account_id: &'life1 str,
event: &'life2 RedisEvent,
) -> Pin<Box<dyn Future<Output = Result<(), RedisError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
}
Expand description
Trait for Redis operations that can be mixed into CallableCache