pub struct TierManager {
pub config: TierManagerConfig,
/* private fields */
}Fields§
§config: TierManagerConfigImplementations§
Source§impl TierManager
impl TierManager
pub fn new(database: Arc<MemoryDatabase>, config: TierManagerConfig) -> Self
pub async fn store_tier1_content(&self, session_id: &str, messages: &[Message])
pub async fn get_tier1_content(&self, session_id: &str) -> Option<Vec<Message>>
pub async fn get_tier3_content( &self, session_id: &str, limit: Option<i32>, offset: Option<i32>, ) -> Result<Vec<StoredMessage>>
pub async fn search_tier3_content( &self, session_id: &str, query: &str, limit: usize, ) -> Result<Vec<StoredMessage>>
pub async fn store_tier3_content( &self, session_id: &str, messages: &[Message], ) -> Result<()>
Sourcepub async fn search_cross_session_content(
&self,
current_session_id: &str,
query: &str,
limit: usize,
) -> Result<Vec<StoredMessage>>
pub async fn search_cross_session_content( &self, current_session_id: &str, query: &str, limit: usize, ) -> Result<Vec<StoredMessage>>
Searches across all sessions except the current one based on keyword extraction
pub async fn get_tier_stats(&self, session_id: &str) -> TierStats
pub async fn cleanup_cache(&self, _older_than_seconds: u64) -> usize
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TierManager
impl !RefUnwindSafe for TierManager
impl Send for TierManager
impl Sync for TierManager
impl Unpin for TierManager
impl UnsafeUnpin for TierManager
impl !UnwindSafe for TierManager
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more