UNPKG

node-redisson

Version:

Distributed lock with Redis implementation for Node.js

14 lines (13 loc) 766 B
import { IRedissonInnerConfig } from '../contracts/IRedissonConfig'; import { PartialRecord } from '../types'; import { CommandExecutor, RedisScriptsKey } from './CommandExecutor'; export declare class StreamsCommandExecutor extends CommandExecutor { private readonly eventEmitter; constructor(config: IRedissonInnerConfig); listenForMessage(lastId?: string): Promise<void>; 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>; }