1 | import { RedisOptions } from "../../redis/RedisOptions";
|
2 | export interface SentinelAddress {
|
3 | port: number;
|
4 | host: string;
|
5 | family?: number;
|
6 | }
|
7 | export interface RedisClient {
|
8 | options: RedisOptions;
|
9 | sentinel(subcommand: "sentinels", name: string): Promise<string[]>;
|
10 | sentinel(subcommand: "get-master-addr-by-name", name: string): Promise<string[]>;
|
11 | sentinel(subcommand: "slaves", name: string): Promise<string[]>;
|
12 | subscribe(...channelNames: string[]): Promise<number>;
|
13 | on(event: "message", callback: (channel: string, message: string) => void): void;
|
14 | on(event: "error", callback: (error: Error) => void): void;
|
15 | on(event: "reconnecting", callback: () => void): void;
|
16 | disconnect(): void;
|
17 | }
|
18 | export interface Sentinel {
|
19 | address: Partial<SentinelAddress>;
|
20 | client: RedisClient;
|
21 | }
|