mogami-stream - v0.2.0
    Preparing search index...

    Function rateLimit

    • Limits how many upstream reads can start within a sliding window of perMs milliseconds.

      Every upstream next() call counts toward the limit, including reads that fail or complete the stream. Reads separated by perMs or more do not share a window. Retries inside map do not trigger new upstream reads and are not counted here.

      Parameters

      Returns <T>(source: AsyncIterable<T>) => Stream<T>

      If count is not a positive safe integer or perMs is not finite and positive.

    • Limits how many upstream reads can start within a sliding window of perMs milliseconds.

      Every upstream next() call counts toward the limit, including reads that fail or complete the stream. Reads separated by perMs or more do not share a window. Retries inside map do not trigger new upstream reads and are not counted here.

      Type Parameters

      • T

      Parameters

      Returns Operator<T, T>

      If count is not a positive safe integer or perMs is not finite and positive.