pub struct RetentionConfig {
pub default_ttl: Option<Duration>,
pub per_tenant_ttl: HashMap<String, Option<Duration>>,
}Expand description
Per-tenant retention configuration. Look up a TTL via
ttl_for(tenant_id); None means “keep forever” for that
tenant.
The default rule (from the bead): the CP heartbeat tenant
(system) defaults to 30 days. The CP emits ~69k heartbeat
events/day; without retention this grows unbounded for data
that has no audit value past the dashboard window. Other
tenants default to no TTL — user data stays put unless the
owner opts in.
Per-tenant overrides win over default_ttl; “no entry” falls
back to default_ttl.
Fields§
§default_ttl: Option<Duration>Default TTL when no per-tenant override exists. None = keep forever.
per_tenant_ttl: HashMap<String, Option<Duration>>Per-tenant overrides. Some(None) would mean “explicitly no
TTL”; the API uses Option<Duration> directly so an entry
can record an explicit “keep forever” decision distinct
from “no entry”.
Implementations§
Trait Implementations§
Source§impl Clone for RetentionConfig
impl Clone for RetentionConfig
Source§fn clone(&self) -> RetentionConfig
fn clone(&self) -> RetentionConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more