/*! * Copyright (c) Microsoft Corporation and contributors. All rights reserved. * Licensed under the MIT License. */ /** * Standard throttler config that maps to the params for Throttler and ThrottlerHelper * from `@fluidframework/server-services` package. * @internal */ export interface IThrottleConfig { maxPerMs: number; maxBurst: number; minCooldownIntervalInMs: number; minThrottleIntervalInMs: number; maxInMemoryCacheSize: number; maxInMemoryCacheAgeInMs: number; enableEnhancedTelemetry?: boolean; } /** * Simplified Throttler config that can be converted to an IThrottleConfig * based on the typical inputs used to determine an IThrottleConfig. * This still allows overrides for specific values, but can cut down on the * human math needed for each individual throttle config. * * Most often, we compute ThrottleConfig based on how many events we can support in a given timeframe. * The resulting config is almost always the same maths, with some variation in maxInMemoryCacheSize * and maxInMemoryCacheAgeInMs depending on the need. * @internal */ export interface ISimpleThrottleConfig extends Partial { maxPerInterval: number; intervalInMs: number; } /** * Effectively disables throttling by allowing 1,000,000 events per ms and only checking throttle every 16 min. * Also, will only keep throttle value in cache at a given time to avoid unnecessary memory use. */ export declare const disabledThrottleConfig: IThrottleConfig; /** * Get a valid IThrottleConfig from a config file value. * @internal */ export declare const getThrottleConfig: (configValue: ISimpleThrottleConfig | Partial | "disabled" | undefined) => Partial; //# sourceMappingURL=throttlerConfigs.d.ts.map