UNPKG

redis-smq-common

Version:

RedisSMQ Common Library provides many components that are mainly used by RedisSMQ and RedisSMQ Monitor.

17 lines 1.1 kB
import { ICallback } from '../async/index.js'; import { EventEmitter, IEventBus, TEventBusEvent } from '../event/index.js'; import { IRedisClient, IRedisConfig } from '../redis-client/index.js'; export declare class EventBusRedis<Events extends TEventBusEvent> extends EventEmitter<Events> implements IEventBus<Events> { protected connected: boolean; protected pubClient: IRedisClient; protected subClient: IRedisClient; protected constructor(pubClient: IRedisClient, subClient: IRedisClient); emit<E extends keyof Events>(event: E, ...args: Parameters<Events[E]>): boolean; on<E extends keyof Events>(event: E, listener: Events[E]): this; once<E extends keyof Events>(event: E, listener: Events[E]): this; removeAllListeners<E extends keyof Events>(event?: Extract<E, string>): this; removeListener<E extends keyof Events>(event: E, listener: Events[E]): this; shutdown(cb: ICallback<void>): void; static createInstance<T extends TEventBusEvent>(config: IRedisConfig, cb: ICallback<IEventBus<T>>): void; } //# sourceMappingURL=event-bus-redis.d.ts.map