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 integrity;
14mod model;
15mod response;
16mod snapshot;
17mod state_machine;
18mod validate;
19
20pub use command::StreamCommand;
21pub use integrity::StreamIntegritySnapshot;
22pub use model::AppendStreamInput;
23pub use model::COLD_INDEX_PAGE_SPAN_BYTES;
24pub use model::ColdChunkRef;
25pub use model::ColdFlushCandidate;
26pub use model::ColdGcEntry;
27pub use model::ColdGcTarget;
28pub use model::ExternalPayloadRef;
29pub use model::HotPayloadSegment;
30pub use model::ObjectPayloadRef;
31pub use model::ProducerAppendRecord;
32pub use model::ProducerRequest;
33pub use model::ProducerSnapshot;
34pub use model::StreamBatchAppend;
35pub use model::StreamBatchAppendItem;
36pub use model::StreamBootstrapPlan;
37pub use model::StreamMessageRecord;
38pub use model::StreamMetadata;
39pub use model::StreamRead;
40pub use model::StreamReadColdIndexSegment;
41pub use model::StreamReadColdSegment;
42pub use model::StreamReadObjectSegment;
43pub use model::StreamReadPlan;
44pub use model::StreamReadSegment;
45pub use model::StreamStatus;
46pub use model::StreamVisibleSnapshot;
47pub use response::StreamErrorCode;
48pub use response::StreamErrorContext;
49pub use response::StreamResponse;
50pub use snapshot::StreamSnapshot;
51pub use snapshot::StreamSnapshotEntry;
52pub use snapshot::StreamSnapshotError;
53pub use state_machine::StreamStateMachine;
54pub use validate::validate_bucket_id;
55pub use validate::validate_stream_id;