• Preparing search index...
  • The search index is not available
@daiso-tech/core - v0.56.0
  • @daiso-tech/core
  • RateLimiter
  • withRateLimiterPrefix

Function withRateLimiterPrefix

  • withRateLimiterPrefix(prefix: string): PluginFn<IRateLimiterAdapter>
  • Creates a plugin that prefixes all keys passed to a rate-limiter adapter.

    Every method that accepts a rate-limiter key will have the given prefix prepended before the call is forwarded to the underlying adapter. This is useful for namespacing rate-limiter state when multiple independent consumers share the same backend.

    Parameters

    • prefix: string

      The string to prepend to every rate-limiter key.

    Returns PluginFn<IRateLimiterAdapter>

    A middleware plugin that wraps an IRateLimiterAdapter.

    IMPORT_PATH: "@daiso-tech/core/rate-limiter/plugins"

    • Defined in src/rate-limiter/implementations/plugins/with-rate-limiter-prefix/with-rate-limiter-prefix.ts:22

Settings

Member Visibility
@daiso-tech/core - v0.56.0
  • Loading...

Generated using TypeDoc