EventSource
@rotorsoft/act-root / act/src / EventSource
Interface: EventSource
Defined in: libs/act/src/types/action.ts:990
Read end of the transfer pipeline (ACT-1128 / #788). Anything
that exposes a Store.query-shaped reader plus dispose can be
used as a source for IAct.restore.
Store extends this interface; the framework's CsvFile utility
implements it on top of file I/O so a CSV can be a transfer
source. The pipeline never sees a discriminator โ both ends speak
the same shape.
Extendsโ
Extended byโ
Propertiesโ
disposeโ
dispose:
Disposer
Defined in: libs/act/src/types/ports.ts:27
Inherited fromโ
Disposable.dispose
Methodsโ
query()โ
query<
E>(callback,query?):Promise<number>
Defined in: libs/act/src/types/action.ts:1001
Read events into a per-event callback. Adapters MUST await Promise.resolve(callback(event)) per event โ sync callbacks
resolve immediately (zero overhead), async callbacks throttle
the read loop. This is the seam that lets iterate() apply
backpressure without changing the callback's declared return
type. Callback returns void, which TypeScript treats as
"return value ignored" โ existing call sites passing
e => arr.push(e) (which returns number) keep working.
Type Parametersโ
Eโ
E extends Schemas
Parametersโ
callbackโ
(event) => void
query?โ
Readonly<{ after?: number; backward?: boolean; before?: number; correlation?: string; created_after?: Date; created_before?: Date; limit?: number; names?: string[]; stream?: string; stream_exact?: boolean; with_snaps?: boolean; }>
Returnsโ
Promise<number>