Skip to main content

CheckpointSynchronizer

Trait CheckpointSynchronizer 

Source
pub trait CheckpointSynchronizer: Sync {
    // Required methods
    fn push(
        &self,
        checkpoint: Uuid,
        storage: Arc<dyn StorageBackend>,
        remote_config: SyncConfig,
        host_info: Option<HostInfo>,
    ) -> Result<Option<CheckpointSyncMetrics>>;
    fn pull(
        &self,
        storage: Arc<dyn StorageBackend>,
        remote_config: SyncConfig,
        host_info: Option<HostInfo>,
        standby: bool,
    ) -> Result<(CheckpointMetadata, Option<CheckpointSyncMetrics>)>;
    fn list_remote(
        &self,
        remote_config: SyncConfig,
    ) -> Result<Vec<RemoteCheckpoint>>;
}

Required Methods§

Source

fn push( &self, checkpoint: Uuid, storage: Arc<dyn StorageBackend>, remote_config: SyncConfig, host_info: Option<HostInfo>, ) -> 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.

Source

fn pull( &self, storage: Arc<dyn StorageBackend>, remote_config: SyncConfig, host_info: Option<HostInfo>, standby: bool, ) -> 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.

Source

fn list_remote( &self, remote_config: SyncConfig, ) -> Result<Vec<RemoteCheckpoint>>

List checkpoints available in remote object storage.

Trait Implementations§

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§