Skip to main content

harmos_storage/
lib.rs

1/* ***
2 *
3 * Harmos
4 *
5 * SPDX-License-Identifier: Apache-2.0
6 *
7 * ***
8 */
9
10/* === Modules === */
11
12mod admissions;
13
14pub mod aggregate;
15pub mod arrow;
16mod backend;
17mod batch;
18mod batching;
19mod capacity;
20pub mod config;
21mod deletion;
22pub mod directory;
23mod error;
24pub mod execution;
25mod file_batch;
26mod file_capture;
27mod file_checkpoint;
28mod file_follow;
29mod file_hash;
30mod file_production;
31mod file_reads;
32pub mod follow;
33pub mod json;
34mod local;
35mod manager;
36mod memory;
37mod object_admissions;
38mod objects;
39pub mod query;
40mod queue;
41mod read_batch;
42mod read_session;
43mod receipts;
44mod schema_encoding;
45mod selection;
46pub mod signal;
47mod snapshot;
48mod staging;
49pub mod state;
50mod worker;
51pub mod writes;
52
53/* === Re-Exports === */
54
55pub use backend::{BackendSnapshot, ReadLimits, ScanPage, StorageBackend, StorageBackends, StorageFuture};
56pub use batch::{FileChunk, StorageBatch};
57pub use config::{StorageBudget, StorageFilesystemSettings, StorageRequestSettings, StorageResponseSettings, StorageSettings};
58pub use directory::{DirectoryReader, DirectoryWatcher};
59pub use error::{BackendFailure, Error, Result};
60pub use file_batch::{FileReadBatch, FileReadEvent, FileReadSlice};
61pub use file_checkpoint::FileCheckpoint;
62pub use file_follow::FileFollower;
63pub use file_production::ProductionFollower;
64pub use file_reads::FileReader;
65pub use harmos_domain::model::storage::files;
66pub use harmos_domain::model::storage::{
67    ByteRange, CaptureConsistency, FileBatch, FileCompletion, FileEvent, FileHash, FileMetadata, FilePhase, FileProducer, FileProgress,
68    FileReference, FileSession, FileSource, FollowStart, IdentityKind, IdentitySelection, MutationId, MutationWindow, ObjectCatalog,
69    ObjectDefinition, ObjectDefinitions, ObjectEntry, ObjectKey, ObjectPoint, ObjectReceipt, ObjectRetention, ObjectRevision, ObjectValue,
70    ObjectVersion, ObjectVersionToken, PayloadEncoding, RecordInput, RecordWrite, RecoveryPosition, SchemaInfo, SchemaInput, SchemaKey,
71    StagedFile, StorageCursor, StorageInfo, StoreHistory, StoredIdentity, StoredObject, StoredRecord, StoredRow, StreamInput, StreamWrite,
72};
73pub use json::{JsonStorage, JsonStorageSettings};
74pub use manager::{ErasedCatalog, StorageManager, StorageMetrics, WorkerOwner, encoded_size};
75pub use objects::ObjectGroup;
76pub use query::{ObjectRead, ObjectReader, QueryReader, RecordRead, RecordReader};
77pub use read_batch::{ReadBatch, ReadPages};
78pub use read_session::ReadSession;
79pub use receipts::{MutationReceipt, MutationValue};
80pub use staging::StorageFile;
81
82pub use harmos_domain::{Aggregate, Identifier, MemorySize, Message, btree_map_memory, schema};
83pub use staging::checkpoint::FileSave;
84pub use worker::Worker;
85pub use writes::StorageSchema;
86
87/* === Imports === */
88
89// Standard Library Imports
90
91// Third Party Imports
92extern crate self as harmos_storage;
93
94// Local Imports
95// Internal Paths Refer To This Crate's One Canonical Engine Namespace.
96use crate as storage;
97
98/* === Constants === */
99
100/* === Macros === */
101
102/* === Type Aliases === */
103
104/* === Structs === */
105
106/* === Enums === */
107
108/* === Traits === */
109
110/* === Implementations === */
111
112/* === Public Functions === */
113
114/* === Private Functions === */
115
116/* === Tests === */
117
118#[cfg(test)]
119#[allow(dead_code, reason = "capacity invariants use the shared in-memory storage backends")]
120#[path = "../tests/support/storage.rs"]
121mod test_backend;