UNPKG

1.28 kBTypeScriptView Raw
1import { Logger } from '@nestjs/common/services/logger.service';
2import { ReadPacket, RedisOptions, WritePacket } from '../interfaces';
3import { ClientProxy } from './client-proxy';
4type Redis = any;
5/**
6 * @publicApi
7 */
8export declare class ClientRedis extends ClientProxy {
9 protected readonly options: RedisOptions['options'];
10 protected readonly logger: Logger;
11 protected readonly subscriptionsCount: Map<string, number>;
12 protected pubClient: Redis;
13 protected subClient: Redis;
14 protected connection: Promise<any>;
15 protected isExplicitlyTerminated: boolean;
16 constructor(options: RedisOptions['options']);
17 getRequestPattern(pattern: string): string;
18 getReplyPattern(pattern: string): string;
19 close(): void;
20 connect(): Promise<any>;
21 createClient(): Redis;
22 handleError(client: Redis): void;
23 getClientOptions(): Partial<RedisOptions['options']>;
24 createRetryStrategy(times: number): undefined | number;
25 createResponseCallback(): (channel: string, buffer: string) => Promise<void>;
26 protected publish(partialPacket: ReadPacket, callback: (packet: WritePacket) => any): () => void;
27 protected dispatchEvent(packet: ReadPacket): Promise<any>;
28 protected unsubscribeFromChannel(channel: string): void;
29}
30export {};