Skip to main content

Module journal

Module journal 

Expand description

Journal subsystem: append-only writer, reader, encoding, and replay harness.

The journal is the canonical source of truth for all engine state. State is derived by deterministic replay of journal events through the crate::reducer.

Re-exports§

pub use async_writer::AsyncJournalWriter;
pub use encoding::CborEncoding;
pub use encoding::Encoding;
pub use encoding::JournalEncoding;
pub use encoding::NdJsonEncoding;
pub use error::JournalError;
pub use error::ReplayError;
pub use reader::JournalReader;
pub use reader::verify_hash_chain;
pub use replay::CheckpointData;
pub use replay::ReplayConfig;
pub use replay::ReplayResult;
pub use replay::load_checkpoint_data;
pub use replay::replay;
pub use replay::replay_from_journal;
pub use replay::scan_last_checkpoint;
pub use writer::FsyncPolicy;
pub use writer::JournalMeta;
pub use writer::JournalWriter;
pub use writer::JournalWriterBuilder;

Modules§

async_writer
Async journal writer that decouples disk I/O from the engine loop.
encoding
Journal encoding trait and implementations (JOURNAL_SPEC §6).
error
Error types for the journal subsystem.
reader
Journal reader with sequence and event_id validation.
replay
Replay harness implementing JOURNAL_SPEC §9.2.
writer
Append-only journal writer with length-prefixed framing.