Skip to main content

Crate ursula_stream

Crate ursula_stream 

Source
Expand description

Durable Streams state machine for Ursula.

Module map:

  • [command]: replicated command variants applied to the state machine.
  • [response]: result variants and error codes returned per command.
  • [model]: persistent data types (metadata, segments, producer state, plans).
  • [record_index]: exact retained record-ordinal to offset boundaries.
  • [snapshot]: snapshot wire format and restoration errors.
  • [state_machine]: the deterministic StreamStateMachine that drives a Raft group.
  • [validate]: bucket/stream id validation used by HTTP and Raft entry points.

Structs§

AppendStreamInput
BucketQuota
Per-bucket data-plane quota stored in replicated state. None means unlimited. Every Raft group stores the same record and enforces it against its own local BucketUsage, so the cluster-wide bound is limit × group_count: an abuse backstop, not exact tenant accounting. Exact tenant-level enforcement happens at the gateway from aggregated usage.
BucketQuotaSnapshot
One bucket’s quota as stored in a group or persisted in a snapshot.
BucketUsage
Per-bucket committed usage inside one Raft group’s replicated state.
BucketUsageSnapshot
One bucket’s usage as reported by a group or persisted in a snapshot.
ColdFlushCandidate
ColdGcEntry
One unit of deferred cold-storage reclamation. Enqueued deterministically in the state machine when a stream’s cold objects become unreferenced, drained asynchronously by the leader’s background GC worker.
HotPayloadSegment
ObjectPayloadRef
ProducerAppendRecord
ProducerReceipt
ProducerSnapshot
SharedColdObjectOwnersSnapshot
StreamAttrs
StreamBatchAppend
StreamBatchAppendItem
StreamBootstrapPlan
StreamIntegritySnapshot
StreamMessageRecord
StreamMetadata
StreamRead
StreamReadColdIndexSegment
StreamReadColdSegment
StreamReadObjectSegment
StreamReadPlan
StreamRecordIndex
StreamRecordRange
StreamSnapshot
StreamSnapshotEntry
StreamStateMachine
StreamVisibleSnapshot

Enums§

ColdGcTarget
RecordIndexError
StreamCommand
StreamErrorCode
StreamErrorContext
StreamReadSegment
StreamResponse
StreamSnapshotError
StreamStatus

Constants§

COLD_INDEX_PAGE_SPAN_BYTES
COMMITTED_WRITE_UNIT_BYTES
Size of the self-described derived write unit exported by Ursula.

Functions§

canonical_json_record_ends
is_json_record_content_type
validate_bucket_id
validate_stream_id

Type Aliases§

ColdChunkRef
ExternalPayloadRef
ProducerRequest