Beignet API reference
    Preparing search index...

    Options for adapting an app-owned Upstash client directly.

    interface CreateUpstashRateLimitOptions {
        algorithm?: UpstashRateLimitAlgorithm;
        client: Redis;
        instrumentation?: ProviderInstrumentationTarget;
        prefix?: string;
        timeoutMs?: number;
        timeoutPolicy?: UpstashRateLimitTimeoutPolicy;
    }
    Index

    Rate limit algorithm used for every bucket served by this port.

    "fixed-window"
    
    client: Redis

    Upstash Redis client used for rate limit counters.

    Optional provider instrumentation target.

    prefix?: string

    Prefix for keys used by this rate limiter.

    "beignet:ratelimit"
    
    timeoutMs?: number

    Maximum time to wait for an Upstash decision, from 1 through 2,147,483,647 milliseconds.

    5000
    

    Behavior when Upstash does not respond before timeoutMs.

    "fail-closed" throws so protected work does not continue without a rate-limit decision. "fail-open" allows the request and emits a degraded instrumentation event.

    "fail-closed"