strand-blobs · store
Source declarations, signatures and documentation for store.
Reviewed implementation boundary: The current GC path quarantines records without reclaiming their stored files. Check actual writer/list/report interfaces and partial-write behavior in /libraries/strand-blobs/overview.
Source: sigil/weave/models/strand-blobs/src/store.rs. SHA-256: 6ef355c275e1308d1f71871e3916a5e0435a011b31c49f666dc171da3097aec2.
This reference follows declared source modules, retains conditional attributes, and includes public declarations and implementation methods. Private-module re-exports and trait resolution require the compiler; this is a source reference, not a claim that every listed item is a root import. Function bodies and constant values are omitted.
store::BlobStore
A content-addressed blob store built on Strand
pub struct BlobStore {
}Source line: 31.
store::ListOptions
Options for listing blobs
#[derive(Debug, Clone, Default)]
pub struct ListOptions {
/// Starting offset
pub offset: Option<u64>,
/// Maximum number of results
pub limit: Option<u64>,
/// Filter by metadata key
pub filter_key: Option<String>,
/// Filter by metadata value
pub filter_value: Option<serde_json::Value>
}Source line: 71.
store::ListResult
Result of listing blobs
#[derive(Debug, Serialize, Deserialize)]
pub struct ListResult {
/// List of blobs
pub blobs: Vec<BlobInfo>,
/// Total number of blobs
pub total: u64,
/// Whether there are more results
pub has_more: bool
}Source line: 87.
store::BlobStore::new
Create a blob store over existing metadata/data strands.
On open, rebuilds in-memory chunk/blob indexes and the listing index from persisted metadata so a fresh process can put/get against durable strands.
pub async fn new(metadata: Strand, data: Strand, config: BlobConfig) -> Result<Self>;Source line: 118.
store::BlobStore::compact
Compact metadata by scanning and appending quarantine markers for unreferenced chunks. Future versions may rewrite metadata or relocate chunks.
pub async fn compact(&self) -> Result<GcPlan>;Source line: 154.
store::BlobStore::put
Store a blob from a reader
pub async fn put<R>(&self, reader: R, metadata: Option<serde_json::Value>) -> Result<BlobId>
where
R: AsyncRead + Unpin,;Source line: 161.
store::BlobStore::get
Get a blob by ID
pub async fn get(&self, id: &BlobId) -> Result<Option<BlobReader>>;Source line: 324.
store::BlobStore::metrics_snapshot
Export current metrics snapshot
pub fn metrics_snapshot(&self) -> BlobMetricsSnapshot;Source line: 412.
store::BlobStore::ingest_metadata_block
Ingest a verified remote block into the metadata strand
pub async fn ingest_metadata_block(
&self,
seq: u64,
header: &strand::Header,
data: &[u8],
) -> Result<()>;Source line: 417.
store::BlobStore::ingest_data_block
Ingest a verified remote block into the data strand
pub async fn ingest_data_block(
&self,
seq: u64,
header: &strand::Header,
data: &[u8],
) -> Result<()>;Source line: 432.
store::BlobStore::metadata_strand_handle
Get a handle to the metadata strand for read-only replication pulls
pub fn metadata_strand_handle(&self) -> Arc<RwLock<Strand>>;Source line: 447.
store::BlobStore::data_strand_handle
Get a handle to the data strand for read-only replication pulls
pub fn data_strand_handle(&self) -> Arc<RwLock<Strand>>;Source line: 452.
store::BlobStore::delete
Delete a blob (marks as deleted, doesn't free chunks due to dedup)
pub async fn delete(&self, id: &BlobId) -> Result<()>;Source line: 457.
store::BlobStore::gc_sweep
Sweep deletion markers and compute a GC plan (non-destructive)
pub async fn gc_sweep(&self) -> Result<GcPlan>;Source line: 494.
store::BlobStore::gc_apply
Apply a GC plan by appending quarantine markers for auditability
pub async fn gc_apply(&self, plan: &GcPlan) -> Result<()>;Source line: 536.
store::BlobStore::create_writer
Create a writer for streaming blob creation
pub fn create_writer(&self, metadata: Option<serde_json::Value>) -> BlobWriter;Source line: 552.
store::BlobStore::repair_reindex
Rebuild in-memory indexes by scanning the metadata strand and return a minimal repair report.
pub async fn repair_reindex(&self) -> Result<crate::repair::RepairReport>;Source line: 563.
store::BlobStore::list
List all blobs with pagination
pub async fn list(&self, options: ListOptions) -> Result<ListResult>;Source line: 646.
store::BlobStore::dedup_stats
Get deduplication statistics
pub async fn dedup_stats(&self) -> Result<DedupStats>;Source line: 700.