The cluster event emitter interface.

interface IClusterEventEmitter {
    on: ClusterOnFunction;
    off(): void;
    off(event: string): void;
    off(events: string[]): void;
}

Hierarchy (view full)

Properties

Methods

Properties

Allows listening to events published on the cluster.

Any of the events defined in IClusterEvents.

One of the events defined in IClusterEvents.

The callback when the event is received. Listeners' payload are defined in IClusterEvents.

Methods

  • Unsubscribe from all events on the cluster

    Returns void

  • Unsubscribe to an event.

    Parameters

    • event: string

      The event to unsubscribe from.

    Returns void

  • Unsubscribe from all events, or a specific list of events.

    Parameters

    • events: string[]

      The list of events to unsubscribe from.

    Returns void