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

    Class Ladder

    An ordered set of transports backed by an offline buffer.

    Index
    • How many messages are waiting in the buffer.

      Returns Promise<number>

    • Connects every rung, so a send can be tried against each in turn.

      A rung that will not connect is left in the ladder: it may come back, and a send simply falls through it until it does.

      Returns Promise<void>

    • Replays the buffer over the rungs, oldest message first, and reports how many went out.

      Returns Promise<number>

    • Adds a rung, which is tried after the rungs already added.

      Add the cheapest, most-preferred link first and the costliest fallback last, because a send takes the first rung that accepts it. The transport is consumed.

      Parameters

      Returns Promise<void>

    • Sends a payload, falling through the rungs and buffering if none take it.

      Buffering is a success, not a failure: it is what the ladder exists to do.

      Parameters

      • topic: string
      • payload: Buffer

      Returns Promise<Delivery>