()
| 85 | } |
| 86 | |
| 87 | public static getInstance(): RateLimiterManager { |
| 88 | if (!RateLimiterManager.instance) { |
| 89 | RateLimiterManager.instance = new RateLimiterManager() |
| 90 | } |
| 91 | return RateLimiterManager.instance |
| 92 | } |
| 93 | |
| 94 | public async addRateLimiter(id: string, duration: number, limit: number, message: string): Promise<void> { |
| 95 | const release = await this.rateLimiterMutex.acquire() |
no outgoing calls
no test coverage detected