EventStream
Stentor API Reference / stentor-models/src / EventStream
Interface: EventStream
Defined in: packages/stentor-models/src/Events/EventStream.ts:8
An event stream is a collection of events that eventually get dispatched to a particular endpoint.
Methodsβ
addEvent()β
addEvent(
event):void
Defined in: packages/stentor-models/src/Events/EventStream.ts:14
Add an event to the stream. This will not be sent until the event is flushed.
Parametersβ
eventβ
Event\<any>
The event to send.
Returnsβ
void
flush()β
flush():
Promise\<void>
Defined in: packages/stentor-models/src/Events/EventStream.ts:18
Send all the events to the end of the stream.
Returnsβ
Promise\<void>