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//! - [`record_index`]: exact retained record-ordinal to offset boundaries.
9//! - [`snapshot`]: snapshot wire format and restoration errors.
10//! - [`state_machine`]: the deterministic [`StreamStateMachine`] that drives a Raft group.
11//! - [`validate`]: bucket/stream id validation used by HTTP and Raft entry points.
12
13mod command;
14mod integrity;
15mod model;
16mod record_index;
17mod response;
18mod snapshot;
19mod state_machine;
20mod validate;
21
22pub use command::StreamCommand;
23pub use integrity::StreamIntegritySnapshot;
24pub use model::AppendStreamInput;
25pub use model::COLD_INDEX_PAGE_SPAN_BYTES;
26pub use model::ColdChunkRef;
27pub use model::ColdFlushCandidate;
28pub use model::ColdGcEntry;
29pub use model::ColdGcTarget;
30pub use model::ExternalPayloadRef;
31pub use model::HotPayloadSegment;
32pub use model::ObjectPayloadRef;
33pub use model::ProducerAppendRecord;
34pub use model::ProducerRequest;
35pub use model::ProducerSnapshot;
36pub use model::StreamAttrs;
37pub use model::StreamBatchAppend;
38pub use model::StreamBatchAppendItem;
39pub use model::StreamBootstrapPlan;
40pub use model::StreamMessageRecord;
41pub use model::StreamMetadata;
42pub use model::StreamRead;
43pub use model::StreamReadColdIndexSegment;
44pub use model::StreamReadColdSegment;
45pub use model::StreamReadObjectSegment;
46pub use model::StreamReadPlan;
47pub use model::StreamReadSegment;
48pub use model::StreamStatus;
49pub use model::StreamVisibleSnapshot;
50pub(crate) use record_index::PreparedRecordAppend;
51pub use record_index::RecordIndexError;
52pub use record_index::StreamRecordIndex;
53pub use record_index::StreamRecordRange;
54pub use record_index::canonical_json_record_ends;
55pub use record_index::is_json_record_content_type;
56pub use response::StreamErrorCode;
57pub use response::StreamErrorContext;
58pub use response::StreamResponse;
59pub use snapshot::StreamSnapshot;
60pub use snapshot::StreamSnapshotEntry;
61pub use snapshot::StreamSnapshotError;
62pub use state_machine::StreamStateMachine;
63pub use validate::validate_bucket_id;
64pub use validate::validate_stream_id;