pub struct ActivityConfig {
pub stale_threshold: Duration,
}Expand description
Configuration for agent activity tracking.
Controls how stale activities are detected and filtered.
§Example
use std::time::Duration;
use pulsedb::Config;
let config = Config {
activity: pulsedb::ActivityConfig {
stale_threshold: Duration::from_secs(120), // 2 minutes
},
..Default::default()
};Fields§
§stale_threshold: DurationDuration after which an activity with no heartbeat is considered stale.
Activities whose last_heartbeat is older than now - stale_threshold
are excluded from get_active_agents() results. They remain in storage
until explicitly ended or the collective is deleted.
Default: 5 minutes (300 seconds)
Trait Implementations§
Source§impl Clone for ActivityConfig
impl Clone for ActivityConfig
Source§fn clone(&self) -> ActivityConfig
fn clone(&self) -> ActivityConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ActivityConfig
impl Debug for ActivityConfig
Auto Trait Implementations§
impl Freeze for ActivityConfig
impl RefUnwindSafe for ActivityConfig
impl Send for ActivityConfig
impl Sync for ActivityConfig
impl Unpin for ActivityConfig
impl UnsafeUnpin for ActivityConfig
impl UnwindSafe for ActivityConfig
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