pub struct TtlConfig {
pub cleanup_interval: Duration,
pub batch_size: usize,
pub cleanup_on_startup: bool,
pub max_cleanup_duration: Duration,
pub enabled: bool,
pub excluded_namespaces: Vec<NamespaceId>,
pub grace_period_seconds: u64,
}Expand description
Configuration for TTL cleanup service
Fields§
§cleanup_interval: DurationInterval between cleanup runs (default: 60 seconds)
batch_size: usizeMaximum vectors to process per cleanup batch (default: 10000)
cleanup_on_startup: boolWhether to run cleanup on startup (default: true)
max_cleanup_duration: DurationMaximum time to spend on a single cleanup run (default: 30 seconds)
enabled: boolWhether cleanup is enabled (default: true)
excluded_namespaces: Vec<NamespaceId>Namespaces to exclude from automatic cleanup
grace_period_seconds: u64Minimum age before deletion (grace period) in seconds (default: 0)
Implementations§
Source§impl TtlConfig
impl TtlConfig
Sourcepub fn with_cleanup_interval(self, interval: Duration) -> Self
pub fn with_cleanup_interval(self, interval: Duration) -> Self
Set cleanup interval
Sourcepub fn with_batch_size(self, size: usize) -> Self
pub fn with_batch_size(self, size: usize) -> Self
Set batch size
Sourcepub fn with_cleanup_on_startup(self, cleanup: bool) -> Self
pub fn with_cleanup_on_startup(self, cleanup: bool) -> Self
Set whether to cleanup on startup
Sourcepub fn with_max_cleanup_duration(self, duration: Duration) -> Self
pub fn with_max_cleanup_duration(self, duration: Duration) -> Self
Set maximum cleanup duration
Sourcepub fn with_excluded_namespaces(self, namespaces: Vec<NamespaceId>) -> Self
pub fn with_excluded_namespaces(self, namespaces: Vec<NamespaceId>) -> Self
Add excluded namespaces
Sourcepub fn with_grace_period(self, seconds: u64) -> Self
pub fn with_grace_period(self, seconds: u64) -> Self
Set grace period
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TtlConfig
impl RefUnwindSafe for TtlConfig
impl Send for TtlConfig
impl Sync for TtlConfig
impl Unpin for TtlConfig
impl UnsafeUnpin for TtlConfig
impl UnwindSafe for TtlConfig
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