/*! * Copyright (c) Microsoft Corporation and contributors. All rights reserved. * Licensed under the MIT License. */ /** * A rate limiter to make sure that a client can only request help for one task within a time window. * * @deprecated This class has no replacement. * * @privateremarks * This class is not used anywhere in the repo. driver-utils already has a similar class that is used by the odsp and * routerlicious drivers. * @internal */ export declare class RateLimiter { private readonly windowMSec; private readonly requestMap; /** * Creates a rate limiter that keep track of the request it has made * * @param windowMSec - time in millisecond, use to filter out messages * for a clientId if the last request falls within this time window */ constructor(windowMSec: number); /** * Filter out the messages that had already been requested within the time window * * @param clientId - the clientId who want to send the message * @param messages - the message we want to send * @returns the message we approved to send that hasn't been sent recently */ filter(clientId: string, messages: string[]): string[]; } //# sourceMappingURL=rateLimiter.d.ts.map