OptionaldefaultErrorPolicy?: ErrorPolicyYou can set the default ErrorPolicy
OptionalenableAsyncTracking?: booleanIf true, metric tracking will run asynchronously in the background and won't block the function utilizing the circuit breaker logic.
This will only have effect if onlyError settings is true.
OptionaleventBus?: EventBusInputYou can provide an IEventBus or an IEventBusAdapter instance to handle the component's events.
If you provide an adapter, it will be automatically wrapped in an EventBus instance.
OptionalexecutionContext?: IExecutionContextYou can pass IExecutionContext that will be used by context-aware adapters.
Optionalnamespace?: INamespaceOptionalonlyError?: booleanIf true will only apply rate limiting when function errors and not when function is called.
Optionalserde?: OneOrMore<ISerderRegister>You can pass an ISerderRegister instance to the RateLimiterFactory to register the rate limiter's serialization and deserialization logic for the provided adapter.
OptionalserdeTransformerName?: stringThe serde transformer name used to identify rate-limiter serializers and deserializers when there are adapters with the same name.
OptionalwaitUntil?: WaitUntilYou can pass the waitUntil function to handle background promises.
This is required when working with environments like Cloudflare Workers or Vercel Functions to ensure tasks complete after the response is sent.
Base configuration shared by all
RateLimiterFactoryvariants.IMPORT_PATH:
"@daiso-tech/core/rate-limiter"