Expand description
S3-backed storage for hashtree with non-blocking uploads.
This crate provides an S3 storage backend that:
- Stores data locally first (fast writes)
- Syncs to S3 in the background (non-blocking)
- Falls back to S3 if data not in local cache
§Example
ⓘ
use hashtree_s3::{S3Store, S3Config};
use hashtree_core::store::MemoryStore;
use std::sync::Arc;
let local_store = Arc::new(MemoryStore::new());
let config = S3Config {
bucket: "my-bucket".to_string(),
prefix: Some("blobs/".to_string()),
region: None, // Uses AWS_REGION env var
endpoint: None, // For S3-compatible services
};
let s3_store = S3Store::new(local_store, config).await?;Structs§
Enums§
- S3Store
Error - S3 store specific errors