Interface PeerAwareMessageBus<OutMsg, Peer, InMsg>

A peer-aware MessageBus.

interface PeerAwareMessageBus {
    addEventListener<K>(type, listener): void;
    dispatch(message, options?): MaybePromise<void>;
    removeEventListener<K>(type, listener): void;
    subscribe(handler, options?): MaybePromise<Unsubscribe>;
    subscribers(options?): MaybePromise<Iterable<Peer>>;
    topics(options?): MaybePromise<Iterable<string>>;
}

Type Parameters

  • OutMsg

  • Peer = unknown

  • InMsg = OutMsg

Hierarchy

Implemented by

Methods

Generated using TypeDoc