Skip to main content

ursula_stream/
lib.rs

1//! Durable Streams state machine for Ursula.
2//!
3//! Module map:
4//!
5//! - [`command`]: replicated command variants applied to the state machine.
6//! - [`response`]: result variants and error codes returned per command.
7//! - [`model`]: persistent data types (metadata, segments, producer state, plans).
8//! - [`snapshot`]: snapshot wire format and restoration errors.
9//! - [`state_machine`]: the deterministic [`StreamStateMachine`] that drives a Raft group.
10//! - [`validate`]: bucket/stream id validation used by HTTP and Raft entry points.
11
12mod command;
13mod model;
14mod response;
15mod snapshot;
16mod state_machine;
17mod validate;
18
19pub use command::StreamCommand;
20pub use model::{
21    AppendStreamInput, ColdChunkRef, ColdFlushCandidate, ExternalPayloadRef, HotPayloadSegment,
22    ObjectPayloadRef, ProducerAppendRecord, ProducerRequest, ProducerSnapshot, StreamBatchAppend,
23    StreamBatchAppendItem, StreamBootstrapPlan, StreamMessageRecord, StreamMetadata, StreamRead,
24    StreamReadColdSegment, StreamReadObjectSegment, StreamReadPlan, StreamReadSegment,
25    StreamStatus, StreamVisibleSnapshot,
26};
27pub use response::{StreamErrorCode, StreamResponse};
28pub use snapshot::{StreamSnapshot, StreamSnapshotEntry, StreamSnapshotError};
29pub use state_machine::StreamStateMachine;
30pub use validate::{validate_bucket_id, validate_stream_id};