Skip to content

Commit

Permalink
add trait Keep
Browse files Browse the repository at this point in the history
  • Loading branch information
zhuxiujia committed Sep 19, 2023
1 parent 9a4f010 commit 3dbacc1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/plugin/file_split.rs
Original file line number Diff line number Diff line change
Expand Up @@ -289,8 +289,10 @@ impl LogPack {
}
}

/// keep logs, for example keep by log num or keep by log create time.
/// that do not meet the retention conditions will be deleted
pub trait Keep: Send {
/// return removed
/// return removed nums
fn do_keep(&self, dir: &str, temp_name: &str) -> i64;
fn read_paths(&self, dir: &str, temp_name: &str) -> Vec<DirEntry> {
let base_name = get_base_name(&Path::new(temp_name));
Expand Down

0 comments on commit 3dbacc1

Please sign in to comment.