openEventStream
openEventStream(
url,signal):AsyncGenerator<IndexerSseEvent>
Defined in: ootle-indexer/src/event-stream.ts:72
Opens a persistent SSE connection to url using fetch and yields
parsed events as an async generator.
Works in browsers (Fetch + ReadableStream) and Node.js ≥ 18.
Automatically reconnects after errors with a 5 s back-off.
Stops when signal is aborted.
Mirrors the EventStream / into_stream() pattern from the Rust ootle-rs crate.
Parameters
Section titled “Parameters”string
signal
Section titled “signal”AbortSignal
Returns
Section titled “Returns”AsyncGenerator<IndexerSseEvent>
Throws
Section titled “Throws”(caught + logged by the retry loop) if the SSE endpoint returns a non-success status.