EventSource
@rotorsoft/act-root / act/src / EventSource
Interface: EventSource
Defined in: libs/act/src/types/action.ts:1154
Read end of the transfer pipeline. 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:1165
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_pii?: boolean; with_snaps?: boolean; }>
Returns
Promise<number>