Skip to main content

Module traits

Module traits 

Source
Expand description

Trait boundary between engine-core and the runtime.

This module defines the traits that separate the pure engine logic from the runtime (tokio, channels, WAL, NATS, persistence). The engine emits events and journal entries through these traits without knowing anything about the transport or storage backend.

The hypercall crate provides production implementations backed by:

In tests, these can be stubbed with simple in-memory implementations (e.g., a Vec<EngineEvent> behind a mutex).

This module also defines the data types that flow through these traits: EngineEvent, JournalEntry, and JournalError.

Structs§

JournalEntry
A journal entry representing a single command for WAL persistence.

Enums§

EngineEvent
Events emitted by the engine after command processing.
JournalError
Error type for journal write failures.

Traits§

CommandPublisher
Publisher for command replication to standby instances.
EventSink
Sink for engine events emitted after command processing.
JournalWriter
Durable journal writer for crash recovery.