Skip to main content

Module stream_events

Module stream_events 

Source
Expand description

RFC-019 Stage C — Typed stream events.

Stage A/B shipped the cursor machinery + backend adapters emitting StreamEvent { payload: Bytes, … }, forcing every consumer to parse a backend-shaped byte blob (Valkey: NUL-delimited field map, Postgres: serde_json). This module promotes each family to a typed enum so consumers match instead of parsing.

One enum + one subscription alias per family, paralleling the four-family allow-list in [crate::stream_subscribe::StreamFamily]:

Each event carries the same inline-hot fields the Stage A StreamEvent envelope carried (cursor, execution_id where applicable, timestamp) plus family-specific fields promoted out of the old opaque payload.

#[non_exhaustive] is applied to every variant-bearing enum and every event struct so new variants / fields land additively. The owner-adjudicated v0.9 four-family allow-list stays in force — new families require an RFC amendment.

Structs§

CompletionEvent
Per-event payload of subscribe_completion.
SignalDeliveryEvent
Per-event payload of subscribe_signal_delivery.

Enums§

CompletionOutcome
Outcome classification for a completion event.
InstanceTagEvent
Per-event payload of subscribe_instance_tags.
LeaseHistoryEvent
Per-event payload of subscribe_lease_history.
SignalDeliveryEffect
Effect of a signal delivery on the target waitpoint.

Type Aliases§

CompletionSubscription
Stream of typed completion events.
InstanceTagSubscription
Stream of typed instance-tag events.
LeaseHistorySubscription
Stream of typed lease-history events.
SignalDeliverySubscription
Stream of typed signal-delivery events.