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
| Name | Type |
|---|---|
logger? | IRunProgressLogger |
Returns
Defined in
composition/run-progress-event-bus.ts:26
Methods
publish
▸ publish(event): void
Publishes an event to all registered listeners.
Parameters
| Name | Type | Description |
|---|---|---|
event | TRunProgressEvent | The run progress event to broadcast. |
Returns
void
Implementation of
Defined in
composition/run-progress-event-bus.ts:34
subscribe
▸ subscribe(listener): () => void
Registers a listener for run progress events.
Parameters
| Name | Type | Description |
|---|---|---|
listener | TRunProgressEventListener | The callback to invoke on each event. |
Returns
fn
Unsubscribe function that removes the listener.
▸ (): void
Returns
void
Implementation of
IRunProgressEventBus.subscribe