Skip to main content

EventStream

Stentor API Reference


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>