storage-transfer-lib 0.1.2

Bounded bucket-to-bucket transfers using Apache OpenDAL
Documentation
use opendal::Metadata;

// SHA-256 digest of an object's contents, used to verify the copied data.
pub(crate) type Sha256Digest = [u8; 32];

// Describes one file object queued for copying; contains no object data.
// The producer filters out directory entries before creating tasks.
#[derive(Clone, Debug)]
pub struct ObjectTask {
    // Object key relative to the source operator's directory root.
    pub path: String,
    // Metadata returned by listing, such as size and ETag.
    pub metadata: Metadata,
}

#[derive(Clone, Copy, Debug, Default, Eq, PartialEq, serde::Serialize)]
pub struct TransferProgress {
    pub listed_objects: u64,
    // Counted after the destination data and metadata have been verified.
    pub copied_objects: u64,
    pub copied_bytes: u64,
}