UNPKG

@nest-lab/throttler-storage-redis

Version:

Redis storage provider for the @nestjs/throttler package

15 lines (14 loc) 487 B
import { ThrottlerStorage } from '@nestjs/throttler'; import Redis, { Cluster } from 'ioredis'; export interface ThrottlerStorageRedis { /** * The redis instance. */ redis: Redis | Cluster; /** * Increment the amount of requests for a given record. The record will * automatically be removed from the storage once its TTL has been reached. */ increment: ThrottlerStorage['increment']; } export declare const ThrottlerStorageRedis: unique symbol;