1 | import { Transport } from '../enums';
|
2 | import { CustomTransportStrategy, RedisOptions } from '../interfaces';
|
3 | import { Server } from './server';
|
4 | type Redis = any;
|
5 |
|
6 |
|
7 |
|
8 | export declare class ServerRedis extends Server implements CustomTransportStrategy {
|
9 | private readonly options;
|
10 | readonly transportId = Transport.REDIS;
|
11 | private subClient;
|
12 | private pubClient;
|
13 | private isExplicitlyTerminated;
|
14 | constructor(options: RedisOptions['options']);
|
15 | listen(callback: (err?: unknown, ...optionalParams: unknown[]) => void): void;
|
16 | start(callback?: () => void): void;
|
17 | bindEvents(subClient: Redis, pubClient: Redis): void;
|
18 | close(): void;
|
19 | createRedisClient(): Redis;
|
20 | getMessageHandler(pub: Redis): (channel: string, pattern: string, buffer: string | any) => Promise<any>;
|
21 | handleMessage(channel: string, buffer: string | any, pub: Redis, pattern: string): Promise<any>;
|
22 | getPublisher(pub: Redis, pattern: any, id: string): (response: any) => any;
|
23 | parseMessage(content: any): Record<string, any>;
|
24 | getRequestPattern(pattern: string): string;
|
25 | getReplyPattern(pattern: string): string;
|
26 | handleError(stream: any): void;
|
27 | getClientOptions(): Partial<RedisOptions['options']>;
|
28 | createRetryStrategy(times: number): undefined | number | void;
|
29 | }
|
30 | export {};
|