firefly-limiter - v1.0.1
    Preparing search index...

    Interface SlidingWindow

    How much of the recent past a breaker judges on.

    interface SlidingWindow {
        failureRate: number;
        minimumCalls: number;
        size: number;
        slowerThan?: number;
        slowRate?: number;
        within?: number;
    }
    Index
    failureRate: number

    Share of the window that must have failed, from 0 to 1.

    minimumCalls: number

    Calls that must be in the window before a rate can open the circuit, so two failures at three in the morning do not read as 100%.

    size: number

    Calls remembered.

    slowerThan?: number

    Calls slower than this count as slow, whether or not they succeeded.

    slowRate?: number

    Share of the window that must be slow, from 0 to 1. A dependency answering every call in nine seconds is down; it just has not admitted it.

    A circuit opened by slowness alone has no failure to report, so the cause of its CircuitOpenError is undefined.

    within?: number

    How recent a call has to be to count, in milliseconds. Left out, the window is the last size calls however long ago they were, which reads a quiet service's morning as if it were happening now.