node-redisson
Version:
Distributed lock with Redis implementation for Node.js
13 lines (12 loc) • 711 B
TypeScript
import { IRedissonInnerConfig } from '../contracts/IRedissonConfig';
import { PartialRecord } from '../types';
import { CommandExecutor, RedisScriptsKey } from './CommandExecutor';
export declare class PubSubCommandExecutor extends CommandExecutor {
private readonly eventEmitter;
constructor(config: IRedissonInnerConfig);
subscribe<T>(eventName: string, listener: (e: T) => void): Promise<void>;
unsubscribe(eventName: string, listener: (...args: any[]) => void): Promise<void>;
subscribeOnce<T>(eventName: string, listener: (e: T) => void): Promise<void>;
publish(eventName: string, e: string): Promise<string | null>;
getRedisScripts(): PartialRecord<RedisScriptsKey, string>;
}