Skip to main content

Crate gonzalo_core

Crate gonzalo_core 

Source
Expand description

Generic versioned Record/Store core for gonzalo.

Re-exports§

pub use identity::Identity;
pub use key::KeyPrefix;
pub use key::RecordKey;
pub use revision::ContentHash;
pub use revision::Revision;
pub use record::Body;
pub use record::MergeClass;
pub use record::Meta;
pub use record::Record;
pub use record::RecordKind;
pub use manifest::Manifest;
pub use manifest::Reconciliation;
pub use manifest::desired_set;
pub use gc::GcReport;
pub use gc::gc_blobs;
pub use gc::live_slice_hashes;
pub use gc::unreferenced_slices;
pub use error::CoreError;
pub use error::Result;
pub use store::BlobStore;
pub use store::Conflict;
pub use store::DeleteResult;
pub use store::PutResult;
pub use store::Store;
pub use merge::MergeOutcome;
pub use merge::merge;
pub use paths::decode_segment;
pub use paths::object_key;
pub use paths::record_components;
pub use paths::segment;
pub use ancestry::AncestryStore;
pub use sync::SyncConflict;
pub use sync::SyncReport;
pub use sync::sync;
pub use sync::sync_with_ancestry;

Modules§

ancestry
A Store decorator that retains each committed body in a content-addressed BlobStore, keyed by its revision hash, so sync can fetch a divergence’s common ancestor for a true 3-way merge (ADR 0016).
error
Core error type. Note: write conflicts are NOT errors — they are a typed PutResult variant (see store.rs). Errors here are genuine failures (I/O, serialization, missing parent for an update).
gc
Mark-sweep garbage collection for content-addressed slices (ADR 0012).
identity
Contributor identity attached to every write.
key
Stable addressing for records.
manifest
Per-view code-graph manifests: the identity layer over content-addressed slices (ADR 0012).
merge
Merge strategies keyed by MergeClass. Used by Sync (M2) and by callers resolving a PutResult::Conflict.
paths
Shared, filesystem/object-key path mapping used by every storage substrate so a record lands at the same logical location regardless of backend.
record
The universal persisted unit and its classification.
revision
Content hashing and per-record revisions for optimistic concurrency.
store
The generic storage substrate trait and write-outcome types.
sync
Reconcile two Stores. Any store can be a sync peer. Append-only kinds auto-merge by union; structured/opaque divergences are surfaced as conflicts. sync_with_ancestry 3-way-merges structured bodies against their real common ancestor when an AncestryStore retains it; sync uses an empty base (correct for append-only union, safe otherwise) — see ADR 0016.