EventStreamSettings interface

Configuration for creating an event stream

Signature:

export interface EventStreamSettings

Properties

Property Type Description

onEvent

(event: EventStreamEvent) ⇒ void

Callback for handling events from the event stream

onEventError?

(error: Error, eventCase: string) ⇒ void

(Optional) Called when an event from the Manager could not be converted (a shape this SDK does not know, or a field it requires missing). The event is dropped and the stream is read on — without this guard one such event would leave the stream open but silent. Default: the SDK’s debug log (NODE_DEBUG=norsk-manager-sdk).

pendingWindow

number

The number of seconds in the future to consider jobs as pending. Jobs that are further in the future will not surface in the event stream, and instead be only reachable through the search API.