UNPKG

redis-semaphore

Version:

Distributed mutex and semaphore based on Redis

11 lines (10 loc) 438 B
import RedlockMutex from './RedlockMutex'; import { LockOptions, RedisClient } from './types'; export default class RedlockSemaphore extends RedlockMutex { protected _kind: string; protected _limit: number; constructor(clients: RedisClient[], key: string, limit: number, options?: LockOptions); protected _refresh(): Promise<boolean>; protected _acquire(): Promise<boolean>; protected _release(): Promise<void>; }