Skip to main content

mkit_server/store/
mod.rs

1//! The storage contract (PRD ยง5.3): the key-level [`NamespaceStore`], the
2//! content-addressed [`BlobStore`], and the key layouts, value codecs and
3//! typed readers every backend shares. Nothing here needs SQL: a
4//! single-writer key-value store implements the whole contract.
5//!
6//! Layers over the contract that work on any backend: the global
7//! [`ContentIndex`], the portable logical export and import, and the
8//! optional [`StoreMaintenance`] and [`StateCommitment`] hooks.
9//!
10//! The contract types are also re-exported at the crate root; [`keys`],
11//! [`codec`] and [`read`] stay namespaced.
12
13mod blob;
14pub mod codec;
15mod content_index;
16mod pending_holder;
17pub use pending_holder::PendingHolderV1;
18mod error;
19pub mod index;
20pub mod inspection_flags;
21pub mod inspection_holds;
22pub mod inspection_mode;
23pub mod keys;
24mod kv;
25mod maintenance;
26pub mod outbox;
27mod partition;
28pub mod publication;
29pub mod read;
30pub mod restore;
31pub mod tickets;
32pub mod view;
33pub mod watermark;
34
35pub use blob::{
36    BlobBody, BlobKey, BlobMeta, BlobNamespace, BlobStore, ByteRange, CommitOutcome,
37    MAX_BLOB_PIECE_BYTES, MultipartBlobStore, PackSink, PartRef, PartSink, UnsupportedPartSink,
38    is_reserved_pack_keyspace,
39};
40pub(crate) use content_index::BorrowedStore;
41pub use content_index::{
42    BlockEntry, CONTENT_APPLY_WINDOW_MS, ContentIndex, GcPlan, HoldOutcome, Holder, HolderOutcome,
43    HolderPage, HolderRecord, INDEX_FANOUT, MAX_BLOCK_REASON_BYTES, MAX_HOLD_TTL_MS, ObjectState,
44    REF_INDEX_FANOUT, content_shard, content_shards,
45};
46pub use error::{BoxError, StoreError};
47pub use kv::{
48    Batch, BatchOutcome, Cursor, Key, KeyClasses, MAX_BATCH_BYTES, MAX_BATCH_OPS, MAX_KEY_BYTES,
49    MAX_SCAN_RANGES, MAX_VALUE_BYTES, MembershipMode, NamespaceStore, PartitionStats, Precondition,
50    RangeScan, ScanPage, StoreCapabilities, Value, Write,
51};
52pub use maintenance::{
53    EXPORT_END, EXPORT_FORMAT_V1, EXPORT_MAGIC, ExportHeader, ExportPage, ExportReader,
54    ExportRecord, ExportStream, ImportMode, Importer, StateCommitment, StoreMaintenance,
55    encode_export_header, encode_export_record, export_header, export_page, export_partition,
56    import_stream,
57};
58pub use partition::Partition;