1
0
Fork 0
mirror of https://gitlab.com/famedly/conduit.git synced 2025-08-06 17:40:59 +00:00
conduit/src/service/rooms/auth_chain/mod.rs

26 lines
577 B
Rust
Raw Normal View History

mod data;
use std::{sync::Arc, collections::HashSet};
pub use data::Data;
2022-09-07 13:25:51 +02:00
use crate::Result;
2022-10-05 12:45:54 +02:00
pub struct Service {
db: Box<dyn Data>,
}
2022-10-05 12:45:54 +02:00
impl Service {
#[tracing::instrument(skip(self))]
pub fn get_cached_eventid_authchain<'a>(
&'a self,
key: &[u64],
) -> Result<Option<Arc<HashSet<u64>>>> {
2022-10-05 15:33:57 +02:00
self.db.get_cached_eventid_authchain(key)
}
#[tracing::instrument(skip(self))]
pub fn cache_auth_chain(&self, key: Vec<u64>, auth_chain: Arc<HashSet<u64>>) -> Result<()> {
2022-10-05 15:33:57 +02:00
self.db.cache_auth_chain(key, auth_chain)
}
}