EventGatherer

internal interface EventGatherer

Orchestrates the reception of events from remote sources, coordinating between historical (pending) and real-time (live) event delivery modes.

In environments with async notifications enabled, it emits only real-time events from WebSocket. In legacy environments, it first fetches pending events and then transitions to live updates.

The current mode of delivery (PENDING or LIVE) is tracked via currentSource.

Inheritors

Properties

Link copied to clipboard
abstract val currentSource: <Error class: unknown class><EventSource>

Represents the current source of events:

Functions

Link copied to clipboard
abstract suspend fun gatherEvents(): <Error class: unknown class><List<EventEnvelope>>

Emits all unprocessed events stored locally, and updates the currentSource depending on:

Link copied to clipboard
abstract suspend fun receiveEvents(): <Error class: unknown class><Unit>

Establishes a WebSocket connection to start receiving real-time events.