pub struct RetentionConfig {
pub retention_days: u64,
pub max_size_bytes: u64,
pub archive_path: String,
pub tenant_id: Option<String>,
pub check_interval_secs: u64,
pub explicit_cutoff_unix_secs: Option<u64>,
}Expand description
Configuration for receipt retention and archival.
When set on KernelConfig, the kernel can archive aged-out or oversized
receipt databases to a separate read-only SQLite file while keeping archived
receipts verifiable against their Merkle checkpoint roots.
Fields§
§retention_days: u64Number of days to retain receipts in the live database. Default: 90.
max_size_bytes: u64Maximum size in bytes before the live database is rotated. Default: 10 GB.
archive_path: StringPath for the archive SQLite file. Must be writable on first rotation.
tenant_id: Option<String>Optional tenant scope for retention. When set, rotation only archives receipts for this tenant and leaves other tenant evidence untouched.
check_interval_secs: u64How often the kernel maintenance task evaluates rotation, in seconds. Default: 3600 (one hour).
explicit_cutoff_unix_secs: Option<u64>Internal: set by archive_receipts_before to bypass the day/size
threshold and rotate at an explicit cutoff. Not part of any wire form
(no serialized representation of RetentionConfig exists).
Trait Implementations§
Source§impl Clone for RetentionConfig
impl Clone for RetentionConfig
Source§fn clone(&self) -> RetentionConfig
fn clone(&self) -> RetentionConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RetentionConfig
impl Debug for RetentionConfig
Auto Trait Implementations§
impl Freeze for RetentionConfig
impl RefUnwindSafe for RetentionConfig
impl Send for RetentionConfig
impl Sync for RetentionConfig
impl Unpin for RetentionConfig
impl UnsafeUnpin for RetentionConfig
impl UnwindSafe for RetentionConfig
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
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>
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>
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