mod default_executor;
pub use default_executor::*;
#[cfg(test)]
mod default_executor_test;
use d_engine_proto::common::LogId;
#[cfg(any(test, feature = "__test_support"))]
use mockall::automock;
use tonic::async_trait;
use crate::Result;
#[cfg_attr(any(test, feature = "__test_support"), automock)]
#[async_trait]
pub trait PurgeExecutor: Send + Sync + 'static {
async fn execute_purge(
&self,
last_included: LogId,
) -> Result<()>;
#[allow(dead_code)]
async fn validate_purge(
&self,
last_included: LogId,
) -> Result<()> {
let _ = last_included; Ok(())
}
#[allow(dead_code)]
async fn pre_purge(&self) -> Result<()> {
Ok(())
}
#[allow(unused)]
async fn post_purge(&self) -> Result<()> {
Ok(())
}
}