Skip to main content

Module events

Module events 

Expand description

Model-event bus: typed created/updated/deleted envelopes that procedure handlers can subscribe to.

Structs§

CratestackEventBus
CratestackEventEnvelope
ModelEvent
SubscriptionGuard
RAII cleanup for one or more CratestackEventBus subscriptions that all share one lifecycle — e.g. the per-operation handlers a single GET /rpc/subscribe/{op_id} connection registers for the duration of its SSE stream (docs/design/rpc-transport.md §3.4a, cratestack#390). Every tracked handle is unsubscribed when the guard drops, whether that’s because the underlying stream ended normally (backpressure overflow) or because it was cancelled mid-poll (an ordinary client disconnect) — both just drop this guard the same way, so cleanup doesn’t need to special-case which one happened. Without this, a long-running server would accumulate one permanently-registered, permanently-a-no-op handler per historical connection — a real unbounded-memory footgun for a public, freely-reconnectable endpoint, not a hypothetical one.
SubscriptionHandle
Opaque token returned by CratestackEventBus::subscribe, needed to later remove that exact handler via CratestackEventBus::unsubscribe. Fields are private — the only way to obtain one is subscribe, and the only thing it’s good for is passing back to unsubscribe.

Enums§

ModelEventKind

Functions§

event_topic
parse_emit_attribute

Type Aliases§

CratestackEventFuture