use std::collections::HashSet;
use super::DEFAULT_WEBHOOK_DELIVERY_RETENTION_SECONDS;
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub struct LifecycleRepairOptions {
pub webhook_retention_seconds: u64,
}
impl Default for LifecycleRepairOptions {
fn default() -> Self {
Self {
webhook_retention_seconds: DEFAULT_WEBHOOK_DELIVERY_RETENTION_SECONDS,
}
}
}
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct LifecycleRepairReport {
pub scanned_records: u64,
pub referenced_objects: u64,
pub scanned_quarantine_candidates: u64,
pub removed_missing_quarantine_candidates: u64,
pub removed_reachable_quarantine_candidates: u64,
pub removed_held_quarantine_candidates: u64,
pub scanned_retention_holds: u64,
pub removed_expired_retention_holds: u64,
pub removed_missing_retention_holds: u64,
pub scanned_webhook_deliveries: u64,
pub removed_stale_webhook_deliveries: u64,
pub removed_future_webhook_deliveries: u64,
}
#[derive(Debug, Default)]
pub(crate) struct RepairReachability {
pub referenced_object_keys: HashSet<String>,
pub live_dedupe_chunk_hashes: HashSet<String>,
pub scanned_records: u64,
}
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub(crate) enum QuarantineRepairAction {
Keep,
DeleteMissing,
DeleteReachable,
DeleteHeld,
}
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub(crate) enum RetentionHoldRepairAction {
Keep,
DeleteExpired,
DeleteMissing,
}
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub(crate) enum WebhookDeliveryRepairAction {
Keep,
DeleteStale,
DeleteFuture,
}