Skip to content

dag-api / Exports / RunProgressEventBus

Class: RunProgressEventBus

In-memory event bus for broadcasting run progress events to subscribers. When a logger is provided, listener errors are logged and swallowed; otherwise the first error is rethrown.

See

IRunProgressEventBus

Implements

Table of contents

Constructors

Methods

Constructors

constructor

new RunProgressEventBus(logger?): RunProgressEventBus

Parameters

NameType
logger?IRunProgressLogger

Returns

RunProgressEventBus

Defined in

composition/run-progress-event-bus.ts:26

Methods

publish

publish(event): void

Publishes an event to all registered listeners.

Parameters

NameTypeDescription
eventTRunProgressEventThe run progress event to broadcast.

Returns

void

Implementation of

IRunProgressEventBus.publish

Defined in

composition/run-progress-event-bus.ts:34


subscribe

subscribe(listener): () => void

Registers a listener for run progress events.

Parameters

NameTypeDescription
listenerTRunProgressEventListenerThe callback to invoke on each event.

Returns

fn

Unsubscribe function that removes the listener.

▸ (): void

Returns

void

Implementation of

IRunProgressEventBus.subscribe

Defined in

composition/run-progress-event-bus.ts:61

Released under the MIT License.