pamoja for TypeScript - v0.2.0
    Preparing search index...

    Interface ReceivingLink

    A link a rule engine listens on as well as publishes over: a LoopbackTransport, an MqttClient, a CoapClient, or anything else with the same three calls. Connect it first.

    interface ReceivingLink {
        recv(timeoutMs?: number): Promise<profile.LinkMessage | null>;
        send(
            topic: string,
            payload: string | Buffer<ArrayBufferLike>,
        ): Promise<unknown>;
        subscribe(topic: string): Promise<unknown>;
    }

    Hierarchy (View Summary)

    Index
    • Waits for the next message, or null when none arrives in time.

      Parameters

      • OptionaltimeoutMs: number

      Returns Promise<profile.LinkMessage | null>

    • Publishes one message to a topic.

      Parameters

      • topic: string
      • payload: string | Buffer<ArrayBufferLike>

      Returns Promise<unknown>

    • Subscribes to one topic.

      Parameters

      • topic: string

      Returns Promise<unknown>