Type Alias RateLimiterProviderSettingsBase

RateLimiterProviderSettingsBase: ErrorPolicySettings & {
    enableAsyncTracking?: boolean;
    eventBus?: IEventBus;
    namespace?: Namespace;
    onlyError?: boolean;
}

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

Type declaration

  • OptionalenableAsyncTracking?: boolean

    If 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.

    true
    
  • OptionaleventBus?: IEventBus
    import { EventBus } from "@daiso-tech/core/event-bus";
    import { NoOpEventBusAdapter } from "@daiso-tech/core/event-bus/no-op-event-bus-adapter";

    new EventBus({
    adapter: new NoOpEventBusAdapter()
    })
  • Optionalnamespace?: Namespace
    import { Namespace } from "@daiso-tech/core/namespace";

    new Namespace("@rate-limiter")
  • OptionalonlyError?: boolean

    If true will only apply rate limiting when function errors and not when function is called.

    false