mithril_aggregator/services/snapshotter/
interface.rs1use async_trait::async_trait;
2
3use mithril_common::entities::{CompressionAlgorithm, ImmutableFileNumber};
4use mithril_common::StdResult;
5
6use crate::tools::file_archiver::FileArchive;
7
8#[cfg_attr(test, mockall::automock)]
9#[async_trait]
10pub trait Snapshotter: Sync + Send {
12 async fn snapshot_all_completed_immutables(
14 &self,
15 archive_name_without_extension: &str,
16 ) -> StdResult<FileArchive>;
17
18 async fn snapshot_ancillary(
22 &self,
23 immutable_file_number: ImmutableFileNumber,
24 archive_name_without_extension: &str,
25 ) -> StdResult<FileArchive>;
26
27 async fn snapshot_immutable_trio(
29 &self,
30 immutable_file_number: ImmutableFileNumber,
31 archive_name_without_extension: &str,
32 ) -> StdResult<FileArchive>;
33
34 fn compression_algorithm(&self) -> CompressionAlgorithm;
36}