UNPKG

helene

Version:
30 lines (29 loc) 809 B
import { RedisClientOptions } from 'redis'; import { Server } from '../server'; export type RedisMessage = { event: string; channel: string; message: string; }; export declare const RedisKey: { CLIENTS: string; }; /** * This is mainly used to propagate events to other instances when running node in a cluster. */ export declare class RedisTransport { opts: RedisClientOptions; pub: any; sub: any; server: Server; static defaultRedisOpts: RedisClientOptions; constructor(server: Server, opts: RedisClientOptions | boolean); private connect; publish(event: string, channel: string, message: string): Promise<any>; close(): Promise<void>; getStats(): Promise<{ clientCount: number; userCount: number; users: unknown[]; }>; }