@hastehaul/common 2.0.44 → 2.0.45
Sign up to get free protection for your applications and to get access to all the features.
@@ -1,7 +1,8 @@
|
|
1
1
|
import IORedis from 'ioredis';
|
2
|
-
declare class RedisClient {
|
2
|
+
export declare class RedisClient {
|
3
3
|
private master;
|
4
4
|
private replicas;
|
5
|
+
private _redisClient?;
|
5
6
|
private static instance;
|
6
7
|
private constructor();
|
7
8
|
static getInstance(masterHost: string, replicaHosts: string[]): RedisClient;
|
@@ -14,4 +15,3 @@ declare class RedisClient {
|
|
14
15
|
setex(key: string, value: string, seconds: number): Promise<any>;
|
15
16
|
quit(): void;
|
16
17
|
}
|
17
|
-
export default RedisClient;
|
@@ -32,6 +32,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
32
32
|
});
|
33
33
|
};
|
34
34
|
Object.defineProperty(exports, "__esModule", { value: true });
|
35
|
+
exports.RedisClient = void 0;
|
35
36
|
const ioredis_1 = __importStar(require("ioredis"));
|
36
37
|
class RedisClient {
|
37
38
|
constructor(masterHost, replicaHosts) {
|
@@ -83,6 +84,5 @@ class RedisClient {
|
|
83
84
|
this.replicas.forEach(replica => replica.quit());
|
84
85
|
}
|
85
86
|
}
|
86
|
-
|
87
|
+
exports.RedisClient = RedisClient;
|
87
88
|
RedisClient.instance = null;
|
88
|
-
exports.default = RedisClient;
|