@microfleet/ioredis-lock
Version:
Node distributed locking using redis with ioredis adapter
17 lines (16 loc) • 526 B
TypeScript
/**
* redislock exposes a total of two functions: createLock,
* and getActiveLocks.
*/
import { Lock, type Config } from './lock.js';
export * from './errors.js';
export { Config, type Lock };
/**
* Returns a new Lock instance, configured for use with the supplied redis
* client, as well as options, if provided.
*/
export declare function createLock(...args: ConstructorParameters<typeof Lock>): Lock;
/**
* Returns an array of currently active/acquired locks.
*/
export declare function getAcquiredLocks(): Lock[];