Skip to main content

Module cloud

Module cloud 

Source
Expand description

Cloud Storage Backends (#72)

Artifact storage abstraction supporting local, S3, Azure, and GCS backends.

§Toyota Principle: Heijunka (平準化)

Level workloads across storage tiers - artifacts are stored content-addressably to enable efficient caching and deduplication across storage backends.

§Example

use entrenar::storage::cloud::{ArtifactBackend, LocalBackend};
use std::path::PathBuf;

fn example() -> Result<(), Box<dyn std::error::Error>> {
    let backend = LocalBackend::new(PathBuf::from("/tmp/artifacts"));
    let hash = backend.put("model.safetensors", b"test data")?;
    let data = backend.get(&hash)?;
    Ok(())
}

Structs§

ArtifactMetadata
Artifact metadata
AzureConfig
Azure Blob Storage configuration
GCSConfig
Google Cloud Storage configuration
InMemoryBackend
In-memory artifact backend for testing
LocalBackend
Local filesystem artifact backend
MockS3Backend
Mock S3 backend for testing (simulates S3 behavior in memory)
S3Config
S3 backend configuration

Enums§

BackendConfig
Unified artifact backend configuration
CloudError
Cloud storage errors

Traits§

ArtifactBackend
Trait for artifact storage backends

Functions§

compute_hash
Compute SHA-256 hash of data

Type Aliases§

Result
Result type for cloud operations