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]:
| Family | Event enum | Subscription alias |
|---|---|---|
| LeaseHistory | LeaseHistoryEvent | LeaseHistorySubscription |
| Completion | CompletionEvent | CompletionSubscription |
| SignalDelivery | SignalDeliveryEvent | SignalDeliverySubscription |
| InstanceTags | InstanceTagEvent | InstanceTagSubscription |
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§
- Completion
Event - Per-event payload of
subscribe_completion. - Signal
Delivery Event - Per-event payload of
subscribe_signal_delivery.
Enums§
- Completion
Outcome - Outcome classification for a completion event.
- Instance
TagEvent - Per-event payload of
subscribe_instance_tags. - Lease
History Event - Per-event payload of
subscribe_lease_history. - Signal
Delivery Effect - Effect of a signal delivery on the target waitpoint.
Type Aliases§
- Completion
Subscription - Stream of typed completion events.
- Instance
TagSubscription - Stream of typed instance-tag events.
- Lease
History Subscription - Stream of typed lease-history events.
- Signal
Delivery Subscription - Stream of typed signal-delivery events.