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