Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions server/src/storage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ pub use store_metadata::{
put_remote_metadata, put_staging_metadata, resolve_parseable_metadata, StorageMetadata,
};

use self::retention::Retention;
pub use self::staging::StorageDir;

/// local sync interval to move data.records to /tmp dir of that stream.
Expand Down Expand Up @@ -76,6 +77,7 @@ pub struct ObjectStoreFormat {
pub snapshot: Snapshot,
#[serde(default)]
pub cache_enabled: bool,
pub retention: Retention,
}

#[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
Expand Down Expand Up @@ -118,6 +120,7 @@ impl Default for ObjectStoreFormat {
stats: Stats::default(),
snapshot: Snapshot::default(),
cache_enabled: false,
retention: Retention::new(),
}
}
}
Expand Down
6 changes: 6 additions & 0 deletions server/src/storage/retention.rs
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,12 @@ struct TaskView {
duration: String,
}

impl Retention {
pub fn new() -> Self {
Self { tasks: Vec::new() }
}
}

impl TryFrom<Vec<TaskView>> for Retention {
type Error = String;

Expand Down