Documentation
    Preparing search index...

    Interface RateLimit

    Token-bucket rate limit for a single (napplet, opClass) pair.

    The engine computes refillRatePerMs = capacity / windowMs lazily on each evaluate() call — it is never stored in state.

    Maximum tokens (operations) allowed per window.

    Window duration in milliseconds.

    Exceed-action: what to do when the bucket is empty.

    interface RateLimit {
        action: Action;
        capacity: number;
        windowMs: number;
    }
    Index

    Properties

    action: Action
    capacity: number
    windowMs: number