nexus-agents - v2.80.0
    Preparing search index...

    Class McpRateLimiter

    Token bucket rate limiter implementation.

    The token bucket algorithm allows for bursting up to the capacity, while maintaining a steady-state rate equal to the refill rate.

    const limiter = new RateLimiter({
    capacity: 100,
    refillRate: 10,
    refillIntervalMs: 1000,
    });

    if (limiter.tryAcquire()) {
    // Proceed with operation
    } else {
    // Rate limited, reject or queue
    }
    Index

    Constructors

    Methods

    Constructors

    Methods