pub trait CheckpointSynchronizer: Sync {
// Required methods
fn push(
&self,
checkpoint: Uuid,
storage: Arc<dyn StorageBackend>,
remote_config: SyncConfig,
host_info: Option<HostInfo>,
pipeline: PipelineIdentity,
) -> Result<Option<CheckpointSyncMetrics>>;
fn pull(
&self,
storage: Arc<dyn StorageBackend>,
remote_config: SyncConfig,
host_info: Option<HostInfo>,
standby: bool,
pipeline: PipelineIdentity,
) -> Result<(CheckpointMetadata, Option<CheckpointSyncMetrics>)>;
fn list_remote(
&self,
remote_config: SyncConfig,
) -> Result<Vec<RemoteCheckpoint>>;
}Required Methods§
Sourcefn push(
&self,
checkpoint: Uuid,
storage: Arc<dyn StorageBackend>,
remote_config: SyncConfig,
host_info: Option<HostInfo>,
pipeline: PipelineIdentity,
) -> Result<Option<CheckpointSyncMetrics>>
fn push( &self, checkpoint: Uuid, storage: Arc<dyn StorageBackend>, remote_config: SyncConfig, host_info: Option<HostInfo>, pipeline: PipelineIdentity, ) -> Result<Option<CheckpointSyncMetrics>>
Push a checkpoint to remote object storage.
host_info identifies the calling host within a multihost pipeline.
When Some, the checkpoint zip and catalog are written under
host{N}/ in the remote bucket; when None (solo pipeline), the
existing flat layout is used for backward compatibility.
pipeline identifies the pipeline performing the push and is used to
enforce bucket ownership: the push fails before writing any data if the
bucket is already owned by a different pipeline.
Sourcefn pull(
&self,
storage: Arc<dyn StorageBackend>,
remote_config: SyncConfig,
host_info: Option<HostInfo>,
standby: bool,
pipeline: PipelineIdentity,
) -> Result<(CheckpointMetadata, Option<CheckpointSyncMetrics>)>
fn pull( &self, storage: Arc<dyn StorageBackend>, remote_config: SyncConfig, host_info: Option<HostInfo>, standby: bool, pipeline: PipelineIdentity, ) -> Result<(CheckpointMetadata, Option<CheckpointSyncMetrics>)>
Pull a checkpoint from remote object storage.
host_info scopes the pull to the correct host{N}/ subdirectory.
Pass None for solo pipelines to use the existing flat layout.
standby indicates that the pipeline is in standby mode: the
local-storage cache is bypassed (always pull from remote) and a missing
remote checkpoint is treated as an error rather than a fresh start.
pipeline identifies the pipeline performing the pull. It is used only
to warn (never fail) when pulling from a bucket owned by a different
pipeline.
Sourcefn list_remote(
&self,
remote_config: SyncConfig,
) -> Result<Vec<RemoteCheckpoint>>
fn list_remote( &self, remote_config: SyncConfig, ) -> Result<Vec<RemoteCheckpoint>>
List checkpoints available in remote object storage.
Trait Implementations§
impl Collect for &'static dyn CheckpointSynchronizer
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".