UNPKG

@microfleet/ioredis-lock

Version:

Node distributed locking using redis with ioredis adapter

20 lines 534 B
/** * redislock exposes a total of two functions: createLock, * and getActiveLocks. */ import { Lock } from './lock.js'; export * from './errors.js'; /** * Returns a new Lock instance, configured for use with the supplied redis * client, as well as options, if provided. */ export function createLock(...args) { return new Lock(...args); } /** * Returns an array of currently active/acquired locks. */ export function getAcquiredLocks() { return Array.from(Lock._acquiredLocks); } //# sourceMappingURL=redislock.js.map