@apiratorjs/locking-redis
Version:
An extension to the core @apiratorjs/locking library, providing Redis-based implementations of distributed mutexes and semaphores for true cross-process concurrency control in Node.js.
13 lines • 656 B
TypeScript
import { RedisDistributedSemaphore } from "./redis-distributed-semaphore";
import { types } from "@apiratorjs/locking";
import { RedisDistributedMutex } from "./redis-distributed-mutex";
import { RedisClientType } from "redis";
export interface IRedisLockFactory {
createDistributedSemaphore(props: types.DistributedSemaphoreConstructorProps): RedisDistributedSemaphore;
createDistributedMutex(props: types.DistributedMutexConstructorProps): RedisDistributedMutex;
getRedisClient(): RedisClientType;
}
export declare function createRedisLockFactory(options: {
url: string;
}): Promise<IRedisLockFactory>;
//# sourceMappingURL=index.d.ts.map