UNPKG

redis-semaphore

Version:

Distributed mutex and semaphore based on Redis

7 lines (6 loc) 265 B
import { RedisClient } from '../../types'; export interface Options { identifier: string; lockTimeout: number; } export declare function refreshSemaphore(client: RedisClient, key: string, limit: number, permits: number, options: Options): Promise<boolean>;