Skip to main content

RepackOperation

Trait RepackOperation 

Source
pub trait RepackOperation:
    Send
    + Sync
    + 'static {
    // Required methods
    fn key(&self) -> String;
    fn inspect(&self) -> Result<RepackInventory, RepackError>;
    fn run(&self, context: &RepackContext) -> Result<RepackOutcome, RepackError>;
}
Expand description

Storage-specific repack payload driven by the scheduler.

Implementations must stage immutable replacement data, verify all logical identities, and make cutover atomic. Once cutover starts, it must finish even if the context’s token becomes cancelled.

Required Methods§

Source

fn key(&self) -> String

Stable key used to prevent concurrent repacks of the same store.

Source

fn inspect(&self) -> Result<RepackInventory, RepackError>

Cheap facts used by automatic trigger policy.

Source

fn run(&self, context: &RepackContext) -> Result<RepackOutcome, RepackError>

Build, verify, and atomically publish replacement storage.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§