Skip to main content

Module stream_adapter

Module stream_adapter 

Source
Expand description

Best-effort live fanout for runtime events.

RuntimeStreamAdapter is inspired by the Socket.IO Adapter contract (room-based fanout, per-room ordering, non-blocking publish) but is not a Socket.IO implementation and carries no transport. It only moves already-emitted envelopes to live subscribers; durability and replay live in RuntimeEventStore.

Delivery is at-least-once. A slow consumer that falls behind receives a RuntimeStreamError::Lagged item and may reconcile from the store.

Structs§

BroadcastEnvelopeStream
Owned stream bridging a broadcast::Receiver into a Stream.
FailingRuntimeStreamAdapter
RuntimeStreamAdapter that always fails. Used by tests asserting a failed publish does not panic the runtime bridge.
MemoryRuntimeStreamAdapter
In-memory RuntimeStreamAdapter for tests and single-instance setups.

Traits§

RuntimeStreamAdapter
Transport-neutral live fanout for runtime event envelopes.

Type Aliases§

DynRuntimeStreamAdapter
Convenience alias for shared, trait-object stream adapters.