-first commit
This commit is contained in:
16
node_modules/@redis/client/dist/lib/sentinel/commands/SENTINEL_MASTER.d.ts
generated
vendored
Normal file
16
node_modules/@redis/client/dist/lib/sentinel/commands/SENTINEL_MASTER.d.ts
generated
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
import { RedisArgument, MapReply, BlobStringReply } from '../../RESP/types';
|
||||
import { CommandParser } from '../../client/parser';
|
||||
declare const _default: {
|
||||
/**
|
||||
* Returns information about the specified master.
|
||||
* @param parser - The Redis command parser.
|
||||
* @param dbname - Name of the master.
|
||||
*/
|
||||
readonly parseCommand: (this: void, parser: CommandParser, dbname: RedisArgument) => void;
|
||||
readonly transformReply: {
|
||||
readonly 2: (reply: import("../../RESP/types").ArrayReply<BlobStringReply<string>>, preserve?: any, typeMapping?: import("../../RESP/types").TypeMapping | undefined) => MapReply<BlobStringReply<string>, BlobStringReply<string>>;
|
||||
readonly 3: () => MapReply<BlobStringReply, BlobStringReply>;
|
||||
};
|
||||
};
|
||||
export default _default;
|
||||
//# sourceMappingURL=SENTINEL_MASTER.d.ts.map
|
||||
1
node_modules/@redis/client/dist/lib/sentinel/commands/SENTINEL_MASTER.d.ts.map
generated
vendored
Normal file
1
node_modules/@redis/client/dist/lib/sentinel/commands/SENTINEL_MASTER.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"SENTINEL_MASTER.d.ts","sourceRoot":"","sources":["../../../../lib/sentinel/commands/SENTINEL_MASTER.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,eAAe,EAAW,MAAM,kBAAkB,CAAC;AACrF,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;;IAIlD;;;;OAIG;gDACkB,aAAa,UAAU,aAAa;;;0BAKtB,SAAS,eAAe,EAAE,eAAe,CAAC;;;AAX/E,wBAa6B"}
|
||||
18
node_modules/@redis/client/dist/lib/sentinel/commands/SENTINEL_MASTER.js
generated
vendored
Normal file
18
node_modules/@redis/client/dist/lib/sentinel/commands/SENTINEL_MASTER.js
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const generic_transformers_1 = require("../../commands/generic-transformers");
|
||||
exports.default = {
|
||||
/**
|
||||
* Returns information about the specified master.
|
||||
* @param parser - The Redis command parser.
|
||||
* @param dbname - Name of the master.
|
||||
*/
|
||||
parseCommand(parser, dbname) {
|
||||
parser.push('SENTINEL', 'MASTER', dbname);
|
||||
},
|
||||
transformReply: {
|
||||
2: (generic_transformers_1.transformTuplesReply),
|
||||
3: undefined
|
||||
}
|
||||
};
|
||||
//# sourceMappingURL=SENTINEL_MASTER.js.map
|
||||
1
node_modules/@redis/client/dist/lib/sentinel/commands/SENTINEL_MASTER.js.map
generated
vendored
Normal file
1
node_modules/@redis/client/dist/lib/sentinel/commands/SENTINEL_MASTER.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"SENTINEL_MASTER.js","sourceRoot":"","sources":["../../../../lib/sentinel/commands/SENTINEL_MASTER.ts"],"names":[],"mappings":";;AAEA,8EAA2E;AAE3E,kBAAe;IACb;;;;OAIG;IACH,YAAY,CAAC,MAAqB,EAAE,MAAqB;QACvD,MAAM,CAAC,IAAI,CAAC,UAAU,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC;IAC5C,CAAC;IACD,cAAc,EAAE;QACd,CAAC,EAAE,CAAA,2CAAqC,CAAA;QACxC,CAAC,EAAE,SAAwE;KAC5E;CACyB,CAAC"}
|
||||
16
node_modules/@redis/client/dist/lib/sentinel/commands/SENTINEL_MONITOR.d.ts
generated
vendored
Normal file
16
node_modules/@redis/client/dist/lib/sentinel/commands/SENTINEL_MONITOR.d.ts
generated
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
import { CommandParser } from '../../client/parser';
|
||||
import { RedisArgument, SimpleStringReply } from '../../RESP/types';
|
||||
declare const _default: {
|
||||
/**
|
||||
* Instructs a Sentinel to monitor a new master with the specified parameters.
|
||||
* @param parser - The Redis command parser.
|
||||
* @param dbname - Name that identifies the master.
|
||||
* @param host - Host of the master.
|
||||
* @param port - Port of the master.
|
||||
* @param quorum - Number of Sentinels that need to agree to trigger a failover.
|
||||
*/
|
||||
readonly parseCommand: (this: void, parser: CommandParser, dbname: RedisArgument, host: RedisArgument, port: RedisArgument, quorum: RedisArgument) => void;
|
||||
readonly transformReply: () => SimpleStringReply<'OK'>;
|
||||
};
|
||||
export default _default;
|
||||
//# sourceMappingURL=SENTINEL_MONITOR.d.ts.map
|
||||
1
node_modules/@redis/client/dist/lib/sentinel/commands/SENTINEL_MONITOR.d.ts.map
generated
vendored
Normal file
1
node_modules/@redis/client/dist/lib/sentinel/commands/SENTINEL_MONITOR.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"SENTINEL_MONITOR.d.ts","sourceRoot":"","sources":["../../../../lib/sentinel/commands/SENTINEL_MONITOR.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAW,MAAM,kBAAkB,CAAC;;IAG3E;;;;;;;OAOG;gDACkB,aAAa,UAAU,aAAa,QAAQ,aAAa,QAAQ,aAAa,UAAU,aAAa;mCAG5E,kBAAkB,IAAI,CAAC;;AAZvE,wBAa6B"}
|
||||
17
node_modules/@redis/client/dist/lib/sentinel/commands/SENTINEL_MONITOR.js
generated
vendored
Normal file
17
node_modules/@redis/client/dist/lib/sentinel/commands/SENTINEL_MONITOR.js
generated
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.default = {
|
||||
/**
|
||||
* Instructs a Sentinel to monitor a new master with the specified parameters.
|
||||
* @param parser - The Redis command parser.
|
||||
* @param dbname - Name that identifies the master.
|
||||
* @param host - Host of the master.
|
||||
* @param port - Port of the master.
|
||||
* @param quorum - Number of Sentinels that need to agree to trigger a failover.
|
||||
*/
|
||||
parseCommand(parser, dbname, host, port, quorum) {
|
||||
parser.push('SENTINEL', 'MONITOR', dbname, host, port, quorum);
|
||||
},
|
||||
transformReply: undefined
|
||||
};
|
||||
//# sourceMappingURL=SENTINEL_MONITOR.js.map
|
||||
1
node_modules/@redis/client/dist/lib/sentinel/commands/SENTINEL_MONITOR.js.map
generated
vendored
Normal file
1
node_modules/@redis/client/dist/lib/sentinel/commands/SENTINEL_MONITOR.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"SENTINEL_MONITOR.js","sourceRoot":"","sources":["../../../../lib/sentinel/commands/SENTINEL_MONITOR.ts"],"names":[],"mappings":";;AAGA,kBAAe;IACb;;;;;;;OAOG;IACH,YAAY,CAAC,MAAqB,EAAE,MAAqB,EAAE,IAAmB,EAAE,IAAmB,EAAE,MAAqB;QACxH,MAAM,CAAC,IAAI,CAAC,UAAU,EAAE,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;IACjE,CAAC;IACD,cAAc,EAAE,SAAqD;CAC3C,CAAC"}
|
||||
16
node_modules/@redis/client/dist/lib/sentinel/commands/SENTINEL_REPLICAS.d.ts
generated
vendored
Normal file
16
node_modules/@redis/client/dist/lib/sentinel/commands/SENTINEL_REPLICAS.d.ts
generated
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
import { CommandParser } from '../../client/parser';
|
||||
import { RedisArgument, ArrayReply, BlobStringReply, MapReply, TypeMapping } from '../../RESP/types';
|
||||
declare const _default: {
|
||||
/**
|
||||
* Returns a list of replicas for the specified master.
|
||||
* @param parser - The Redis command parser.
|
||||
* @param dbname - Name of the master.
|
||||
*/
|
||||
readonly parseCommand: (this: void, parser: CommandParser, dbname: RedisArgument) => void;
|
||||
readonly transformReply: {
|
||||
readonly 2: (reply: ArrayReply<ArrayReply<BlobStringReply>>, preserve?: any, typeMapping?: TypeMapping) => MapReply<BlobStringReply<string>, BlobStringReply<string>>[];
|
||||
readonly 3: () => ArrayReply<MapReply<BlobStringReply, BlobStringReply>>;
|
||||
};
|
||||
};
|
||||
export default _default;
|
||||
//# sourceMappingURL=SENTINEL_REPLICAS.d.ts.map
|
||||
1
node_modules/@redis/client/dist/lib/sentinel/commands/SENTINEL_REPLICAS.d.ts.map
generated
vendored
Normal file
1
node_modules/@redis/client/dist/lib/sentinel/commands/SENTINEL_REPLICAS.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"SENTINEL_REPLICAS.d.ts","sourceRoot":"","sources":["../../../../lib/sentinel/commands/SENTINEL_REPLICAS.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,eAAe,EAAE,QAAQ,EAAW,WAAW,EAAe,MAAM,kBAAkB,CAAC;;IAIzH;;;;OAIG;gDACkB,aAAa,UAAU,aAAa;;4BAI5C,WAAW,WAAW,eAAe,CAAC,CAAC,aAAa,GAAG,gBAAgB,WAAW;0BAY5D,WAAW,SAAS,eAAe,EAAE,eAAe,CAAC,CAAC;;;AAtB3F,wBAwB6B"}
|
||||
25
node_modules/@redis/client/dist/lib/sentinel/commands/SENTINEL_REPLICAS.js
generated
vendored
Normal file
25
node_modules/@redis/client/dist/lib/sentinel/commands/SENTINEL_REPLICAS.js
generated
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const generic_transformers_1 = require("../../commands/generic-transformers");
|
||||
exports.default = {
|
||||
/**
|
||||
* Returns a list of replicas for the specified master.
|
||||
* @param parser - The Redis command parser.
|
||||
* @param dbname - Name of the master.
|
||||
*/
|
||||
parseCommand(parser, dbname) {
|
||||
parser.push('SENTINEL', 'REPLICAS', dbname);
|
||||
},
|
||||
transformReply: {
|
||||
2: (reply, preserve, typeMapping) => {
|
||||
const inferred = reply;
|
||||
const initial = [];
|
||||
return inferred.reduce((sentinels, x) => {
|
||||
sentinels.push((0, generic_transformers_1.transformTuplesReply)(x, undefined, typeMapping));
|
||||
return sentinels;
|
||||
}, initial);
|
||||
},
|
||||
3: undefined
|
||||
}
|
||||
};
|
||||
//# sourceMappingURL=SENTINEL_REPLICAS.js.map
|
||||
1
node_modules/@redis/client/dist/lib/sentinel/commands/SENTINEL_REPLICAS.js.map
generated
vendored
Normal file
1
node_modules/@redis/client/dist/lib/sentinel/commands/SENTINEL_REPLICAS.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"SENTINEL_REPLICAS.js","sourceRoot":"","sources":["../../../../lib/sentinel/commands/SENTINEL_REPLICAS.ts"],"names":[],"mappings":";;AAEA,8EAA2E;AAE3E,kBAAe;IACb;;;;OAIG;IACH,YAAY,CAAC,MAAqB,EAAE,MAAqB;QACvD,MAAM,CAAC,IAAI,CAAC,UAAU,EAAE,UAAU,EAAE,MAAM,CAAC,CAAC;IAC9C,CAAC;IACD,cAAc,EAAE;QACd,CAAC,EAAE,CAAC,KAA8C,EAAE,QAAc,EAAE,WAAyB,EAAE,EAAE;YAC/F,MAAM,QAAQ,GAAG,KAA6C,CAAC;YAC/D,MAAM,OAAO,GAAsD,EAAE,CAAC;YAEtE,OAAO,QAAQ,CAAC,MAAM,CACpB,CAAC,SAA4D,EAAE,CAA8B,EAAE,EAAE;gBAC/F,SAAS,CAAC,IAAI,CAAC,IAAA,2CAAoB,EAAC,CAAC,EAAE,SAAS,EAAE,WAAW,CAAC,CAAC,CAAC;gBAChE,OAAO,SAAS,CAAC;YACnB,CAAC,EACD,OAAO,CACR,CAAC;QACJ,CAAC;QACD,CAAC,EAAE,SAAoF;KACxF;CACyB,CAAC"}
|
||||
16
node_modules/@redis/client/dist/lib/sentinel/commands/SENTINEL_SENTINELS.d.ts
generated
vendored
Normal file
16
node_modules/@redis/client/dist/lib/sentinel/commands/SENTINEL_SENTINELS.d.ts
generated
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
import { CommandParser } from '../../client/parser';
|
||||
import { RedisArgument, ArrayReply, MapReply, BlobStringReply, TypeMapping } from '../../RESP/types';
|
||||
declare const _default: {
|
||||
/**
|
||||
* Returns a list of Sentinel instances for the specified master.
|
||||
* @param parser - The Redis command parser.
|
||||
* @param dbname - Name of the master.
|
||||
*/
|
||||
readonly parseCommand: (this: void, parser: CommandParser, dbname: RedisArgument) => void;
|
||||
readonly transformReply: {
|
||||
readonly 2: (reply: ArrayReply<ArrayReply<BlobStringReply>>, preserve?: any, typeMapping?: TypeMapping) => MapReply<BlobStringReply<string>, BlobStringReply<string>>[];
|
||||
readonly 3: () => ArrayReply<MapReply<BlobStringReply, BlobStringReply>>;
|
||||
};
|
||||
};
|
||||
export default _default;
|
||||
//# sourceMappingURL=SENTINEL_SENTINELS.d.ts.map
|
||||
1
node_modules/@redis/client/dist/lib/sentinel/commands/SENTINEL_SENTINELS.d.ts.map
generated
vendored
Normal file
1
node_modules/@redis/client/dist/lib/sentinel/commands/SENTINEL_SENTINELS.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"SENTINEL_SENTINELS.d.ts","sourceRoot":"","sources":["../../../../lib/sentinel/commands/SENTINEL_SENTINELS.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,QAAQ,EAAE,eAAe,EAAW,WAAW,EAAe,MAAM,kBAAkB,CAAC;;IAIzH;;;;OAIG;gDACkB,aAAa,UAAU,aAAa;;4BAI5C,WAAW,WAAW,eAAe,CAAC,CAAC,aAAa,GAAG,gBAAgB,WAAW;0BAY5D,WAAW,SAAS,eAAe,EAAE,eAAe,CAAC,CAAC;;;AAtB3F,wBAwB6B"}
|
||||
25
node_modules/@redis/client/dist/lib/sentinel/commands/SENTINEL_SENTINELS.js
generated
vendored
Normal file
25
node_modules/@redis/client/dist/lib/sentinel/commands/SENTINEL_SENTINELS.js
generated
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const generic_transformers_1 = require("../../commands/generic-transformers");
|
||||
exports.default = {
|
||||
/**
|
||||
* Returns a list of Sentinel instances for the specified master.
|
||||
* @param parser - The Redis command parser.
|
||||
* @param dbname - Name of the master.
|
||||
*/
|
||||
parseCommand(parser, dbname) {
|
||||
parser.push('SENTINEL', 'SENTINELS', dbname);
|
||||
},
|
||||
transformReply: {
|
||||
2: (reply, preserve, typeMapping) => {
|
||||
const inferred = reply;
|
||||
const initial = [];
|
||||
return inferred.reduce((sentinels, x) => {
|
||||
sentinels.push((0, generic_transformers_1.transformTuplesReply)(x, undefined, typeMapping));
|
||||
return sentinels;
|
||||
}, initial);
|
||||
},
|
||||
3: undefined
|
||||
}
|
||||
};
|
||||
//# sourceMappingURL=SENTINEL_SENTINELS.js.map
|
||||
1
node_modules/@redis/client/dist/lib/sentinel/commands/SENTINEL_SENTINELS.js.map
generated
vendored
Normal file
1
node_modules/@redis/client/dist/lib/sentinel/commands/SENTINEL_SENTINELS.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"SENTINEL_SENTINELS.js","sourceRoot":"","sources":["../../../../lib/sentinel/commands/SENTINEL_SENTINELS.ts"],"names":[],"mappings":";;AAEA,8EAA2E;AAE3E,kBAAe;IACb;;;;OAIG;IACH,YAAY,CAAC,MAAqB,EAAE,MAAqB;QACvD,MAAM,CAAC,IAAI,CAAC,UAAU,EAAE,WAAW,EAAE,MAAM,CAAC,CAAC;IAC/C,CAAC;IACD,cAAc,EAAE;QACd,CAAC,EAAE,CAAC,KAA8C,EAAE,QAAc,EAAE,WAAyB,EAAE,EAAE;YAC/F,MAAM,QAAQ,GAAG,KAA6C,CAAC;YAC/D,MAAM,OAAO,GAAsD,EAAE,CAAC;YAEtE,OAAO,QAAQ,CAAC,MAAM,CACpB,CAAC,SAA4D,EAAE,CAA8B,EAAE,EAAE;gBAC/F,SAAS,CAAC,IAAI,CAAC,IAAA,2CAAoB,EAAC,CAAC,EAAE,SAAS,EAAE,WAAW,CAAC,CAAC,CAAC;gBAChE,OAAO,SAAS,CAAC;YACnB,CAAC,EACD,OAAO,CACR,CAAC;QACJ,CAAC;QACD,CAAC,EAAE,SAAoF;KACxF;CACyB,CAAC"}
|
||||
18
node_modules/@redis/client/dist/lib/sentinel/commands/SENTINEL_SET.d.ts
generated
vendored
Normal file
18
node_modules/@redis/client/dist/lib/sentinel/commands/SENTINEL_SET.d.ts
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
import { CommandParser } from '../../client/parser';
|
||||
import { RedisArgument, SimpleStringReply } from '../../RESP/types';
|
||||
export type SentinelSetOptions = Array<{
|
||||
option: RedisArgument;
|
||||
value: RedisArgument;
|
||||
}>;
|
||||
declare const _default: {
|
||||
/**
|
||||
* Sets configuration parameters for a specific master.
|
||||
* @param parser - The Redis command parser.
|
||||
* @param dbname - Name of the master.
|
||||
* @param options - Configuration options to set as option-value pairs.
|
||||
*/
|
||||
readonly parseCommand: (this: void, parser: CommandParser, dbname: RedisArgument, options: SentinelSetOptions) => void;
|
||||
readonly transformReply: () => SimpleStringReply<'OK'>;
|
||||
};
|
||||
export default _default;
|
||||
//# sourceMappingURL=SENTINEL_SET.d.ts.map
|
||||
1
node_modules/@redis/client/dist/lib/sentinel/commands/SENTINEL_SET.d.ts.map
generated
vendored
Normal file
1
node_modules/@redis/client/dist/lib/sentinel/commands/SENTINEL_SET.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"SENTINEL_SET.d.ts","sourceRoot":"","sources":["../../../../lib/sentinel/commands/SENTINEL_SET.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAW,MAAM,kBAAkB,CAAC;AAE7E,MAAM,MAAM,kBAAkB,GAAG,KAAK,CAAC;IACrC,MAAM,EAAE,aAAa,CAAC;IACtB,KAAK,EAAE,aAAa,CAAC;CACtB,CAAC,CAAC;;IAGD;;;;;OAKG;gDACkB,aAAa,UAAU,aAAa;mCAOX,kBAAkB,IAAI,CAAC;;AAdvE,wBAe6B"}
|
||||
18
node_modules/@redis/client/dist/lib/sentinel/commands/SENTINEL_SET.js
generated
vendored
Normal file
18
node_modules/@redis/client/dist/lib/sentinel/commands/SENTINEL_SET.js
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.default = {
|
||||
/**
|
||||
* Sets configuration parameters for a specific master.
|
||||
* @param parser - The Redis command parser.
|
||||
* @param dbname - Name of the master.
|
||||
* @param options - Configuration options to set as option-value pairs.
|
||||
*/
|
||||
parseCommand(parser, dbname, options) {
|
||||
parser.push('SENTINEL', 'SET', dbname);
|
||||
for (const option of options) {
|
||||
parser.push(option.option, option.value);
|
||||
}
|
||||
},
|
||||
transformReply: undefined
|
||||
};
|
||||
//# sourceMappingURL=SENTINEL_SET.js.map
|
||||
1
node_modules/@redis/client/dist/lib/sentinel/commands/SENTINEL_SET.js.map
generated
vendored
Normal file
1
node_modules/@redis/client/dist/lib/sentinel/commands/SENTINEL_SET.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"SENTINEL_SET.js","sourceRoot":"","sources":["../../../../lib/sentinel/commands/SENTINEL_SET.ts"],"names":[],"mappings":";;AAQA,kBAAe;IACb;;;;;OAKG;IACH,YAAY,CAAC,MAAqB,EAAE,MAAqB,EAAE,OAA2B;QACpF,MAAM,CAAC,IAAI,CAAC,UAAU,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;QAEvC,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE,CAAC;YAC7B,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC;QAC3C,CAAC;IACH,CAAC;IACD,cAAc,EAAE,SAAqD;CAC3C,CAAC"}
|
||||
62
node_modules/@redis/client/dist/lib/sentinel/commands/index.d.ts
generated
vendored
Normal file
62
node_modules/@redis/client/dist/lib/sentinel/commands/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,62 @@
|
||||
declare const _default: {
|
||||
readonly SENTINEL_SENTINELS: {
|
||||
readonly parseCommand: (this: void, parser: import("../../..").CommandParser, dbname: import("../../RESP/types").RedisArgument) => void;
|
||||
readonly transformReply: {
|
||||
readonly 2: (reply: import("../../RESP/types").ArrayReply<import("../../RESP/types").ArrayReply<import("../../RESP/types").BlobStringReply<string>>>, preserve?: any, typeMapping?: import("../../RESP/types").TypeMapping | undefined) => import("../../RESP/types").MapReply<import("../../RESP/types").BlobStringReply<string>, import("../../RESP/types").BlobStringReply<string>>[];
|
||||
readonly 3: () => import("../../RESP/types").ArrayReply<import("../../RESP/types").MapReply<import("../../RESP/types").BlobStringReply<string>, import("../../RESP/types").BlobStringReply<string>>>;
|
||||
};
|
||||
};
|
||||
readonly sentinelSentinels: {
|
||||
readonly parseCommand: (this: void, parser: import("../../..").CommandParser, dbname: import("../../RESP/types").RedisArgument) => void;
|
||||
readonly transformReply: {
|
||||
readonly 2: (reply: import("../../RESP/types").ArrayReply<import("../../RESP/types").ArrayReply<import("../../RESP/types").BlobStringReply<string>>>, preserve?: any, typeMapping?: import("../../RESP/types").TypeMapping | undefined) => import("../../RESP/types").MapReply<import("../../RESP/types").BlobStringReply<string>, import("../../RESP/types").BlobStringReply<string>>[];
|
||||
readonly 3: () => import("../../RESP/types").ArrayReply<import("../../RESP/types").MapReply<import("../../RESP/types").BlobStringReply<string>, import("../../RESP/types").BlobStringReply<string>>>;
|
||||
};
|
||||
};
|
||||
readonly SENTINEL_MASTER: {
|
||||
readonly parseCommand: (this: void, parser: import("../../..").CommandParser, dbname: import("../../RESP/types").RedisArgument) => void;
|
||||
readonly transformReply: {
|
||||
readonly 2: (reply: import("../../RESP/types").ArrayReply<import("../../RESP/types").BlobStringReply<string>>, preserve?: any, typeMapping?: import("../../RESP/types").TypeMapping | undefined) => import("../../RESP/types").MapReply<import("../../RESP/types").BlobStringReply<string>, import("../../RESP/types").BlobStringReply<string>>;
|
||||
readonly 3: () => import("../../RESP/types").MapReply<import("../../RESP/types").BlobStringReply<string>, import("../../RESP/types").BlobStringReply<string>>;
|
||||
};
|
||||
};
|
||||
readonly sentinelMaster: {
|
||||
readonly parseCommand: (this: void, parser: import("../../..").CommandParser, dbname: import("../../RESP/types").RedisArgument) => void;
|
||||
readonly transformReply: {
|
||||
readonly 2: (reply: import("../../RESP/types").ArrayReply<import("../../RESP/types").BlobStringReply<string>>, preserve?: any, typeMapping?: import("../../RESP/types").TypeMapping | undefined) => import("../../RESP/types").MapReply<import("../../RESP/types").BlobStringReply<string>, import("../../RESP/types").BlobStringReply<string>>;
|
||||
readonly 3: () => import("../../RESP/types").MapReply<import("../../RESP/types").BlobStringReply<string>, import("../../RESP/types").BlobStringReply<string>>;
|
||||
};
|
||||
};
|
||||
readonly SENTINEL_REPLICAS: {
|
||||
readonly parseCommand: (this: void, parser: import("../../..").CommandParser, dbname: import("../../RESP/types").RedisArgument) => void;
|
||||
readonly transformReply: {
|
||||
readonly 2: (reply: import("../../RESP/types").ArrayReply<import("../../RESP/types").ArrayReply<import("../../RESP/types").BlobStringReply<string>>>, preserve?: any, typeMapping?: import("../../RESP/types").TypeMapping | undefined) => import("../../RESP/types").MapReply<import("../../RESP/types").BlobStringReply<string>, import("../../RESP/types").BlobStringReply<string>>[];
|
||||
readonly 3: () => import("../../RESP/types").ArrayReply<import("../../RESP/types").MapReply<import("../../RESP/types").BlobStringReply<string>, import("../../RESP/types").BlobStringReply<string>>>;
|
||||
};
|
||||
};
|
||||
readonly sentinelReplicas: {
|
||||
readonly parseCommand: (this: void, parser: import("../../..").CommandParser, dbname: import("../../RESP/types").RedisArgument) => void;
|
||||
readonly transformReply: {
|
||||
readonly 2: (reply: import("../../RESP/types").ArrayReply<import("../../RESP/types").ArrayReply<import("../../RESP/types").BlobStringReply<string>>>, preserve?: any, typeMapping?: import("../../RESP/types").TypeMapping | undefined) => import("../../RESP/types").MapReply<import("../../RESP/types").BlobStringReply<string>, import("../../RESP/types").BlobStringReply<string>>[];
|
||||
readonly 3: () => import("../../RESP/types").ArrayReply<import("../../RESP/types").MapReply<import("../../RESP/types").BlobStringReply<string>, import("../../RESP/types").BlobStringReply<string>>>;
|
||||
};
|
||||
};
|
||||
readonly SENTINEL_MONITOR: {
|
||||
readonly parseCommand: (this: void, parser: import("../../..").CommandParser, dbname: import("../../RESP/types").RedisArgument, host: import("../../RESP/types").RedisArgument, port: import("../../RESP/types").RedisArgument, quorum: import("../../RESP/types").RedisArgument) => void;
|
||||
readonly transformReply: () => import("../../RESP/types").SimpleStringReply<"OK">;
|
||||
};
|
||||
readonly sentinelMonitor: {
|
||||
readonly parseCommand: (this: void, parser: import("../../..").CommandParser, dbname: import("../../RESP/types").RedisArgument, host: import("../../RESP/types").RedisArgument, port: import("../../RESP/types").RedisArgument, quorum: import("../../RESP/types").RedisArgument) => void;
|
||||
readonly transformReply: () => import("../../RESP/types").SimpleStringReply<"OK">;
|
||||
};
|
||||
readonly SENTINEL_SET: {
|
||||
readonly parseCommand: (this: void, parser: import("../../..").CommandParser, dbname: import("../../RESP/types").RedisArgument, options: import("./SENTINEL_SET").SentinelSetOptions) => void;
|
||||
readonly transformReply: () => import("../../RESP/types").SimpleStringReply<"OK">;
|
||||
};
|
||||
readonly sentinelSet: {
|
||||
readonly parseCommand: (this: void, parser: import("../../..").CommandParser, dbname: import("../../RESP/types").RedisArgument, options: import("./SENTINEL_SET").SentinelSetOptions) => void;
|
||||
readonly transformReply: () => import("../../RESP/types").SimpleStringReply<"OK">;
|
||||
};
|
||||
};
|
||||
export default _default;
|
||||
//# sourceMappingURL=index.d.ts.map
|
||||
1
node_modules/@redis/client/dist/lib/sentinel/commands/index.d.ts.map
generated
vendored
Normal file
1
node_modules/@redis/client/dist/lib/sentinel/commands/index.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../lib/sentinel/commands/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOA,wBAWmC"}
|
||||
23
node_modules/@redis/client/dist/lib/sentinel/commands/index.js
generated
vendored
Normal file
23
node_modules/@redis/client/dist/lib/sentinel/commands/index.js
generated
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
"use strict";
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const SENTINEL_MASTER_1 = __importDefault(require("./SENTINEL_MASTER"));
|
||||
const SENTINEL_MONITOR_1 = __importDefault(require("./SENTINEL_MONITOR"));
|
||||
const SENTINEL_REPLICAS_1 = __importDefault(require("./SENTINEL_REPLICAS"));
|
||||
const SENTINEL_SENTINELS_1 = __importDefault(require("./SENTINEL_SENTINELS"));
|
||||
const SENTINEL_SET_1 = __importDefault(require("./SENTINEL_SET"));
|
||||
exports.default = {
|
||||
SENTINEL_SENTINELS: SENTINEL_SENTINELS_1.default,
|
||||
sentinelSentinels: SENTINEL_SENTINELS_1.default,
|
||||
SENTINEL_MASTER: SENTINEL_MASTER_1.default,
|
||||
sentinelMaster: SENTINEL_MASTER_1.default,
|
||||
SENTINEL_REPLICAS: SENTINEL_REPLICAS_1.default,
|
||||
sentinelReplicas: SENTINEL_REPLICAS_1.default,
|
||||
SENTINEL_MONITOR: SENTINEL_MONITOR_1.default,
|
||||
sentinelMonitor: SENTINEL_MONITOR_1.default,
|
||||
SENTINEL_SET: SENTINEL_SET_1.default,
|
||||
sentinelSet: SENTINEL_SET_1.default
|
||||
};
|
||||
//# sourceMappingURL=index.js.map
|
||||
1
node_modules/@redis/client/dist/lib/sentinel/commands/index.js.map
generated
vendored
Normal file
1
node_modules/@redis/client/dist/lib/sentinel/commands/index.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../lib/sentinel/commands/index.ts"],"names":[],"mappings":";;;;;AACA,wEAAgD;AAChD,0EAAkD;AAClD,4EAAoD;AACpD,8EAAsD;AACtD,kEAA0C;AAE1C,kBAAe;IACb,kBAAkB,EAAlB,4BAAkB;IAClB,iBAAiB,EAAE,4BAAkB;IACrC,eAAe,EAAf,yBAAe;IACf,cAAc,EAAE,yBAAe;IAC/B,iBAAiB,EAAjB,2BAAiB;IACjB,gBAAgB,EAAE,2BAAiB;IACnC,gBAAgB,EAAhB,0BAAgB;IAChB,eAAe,EAAE,0BAAgB;IACjC,YAAY,EAAZ,sBAAY;IACZ,WAAW,EAAE,sBAAY;CACO,CAAC"}
|
||||
225
node_modules/@redis/client/dist/lib/sentinel/index.d.ts
generated
vendored
Normal file
225
node_modules/@redis/client/dist/lib/sentinel/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,225 @@
|
||||
/// <reference types="node" />
|
||||
import { EventEmitter } from 'node:events';
|
||||
import { CommandArguments, RedisFunctions, RedisModules, RedisScripts, ReplyUnion, RespVersions, TypeMapping } from '../RESP/types';
|
||||
import RedisClient, { RedisClientType } from '../client';
|
||||
import { CommandOptions } from '../client/commands-queue';
|
||||
import { RedisNode, RedisSentinelClientType, RedisSentinelOptions, RedisSentinelType, SentinelCommander } from './types';
|
||||
import { RedisMultiQueuedCommand } from '../multi-command';
|
||||
import { RedisSentinelMultiCommandType } from './multi-commands';
|
||||
import { PubSubListener } from '../client/pub-sub';
|
||||
import { RedisVariadicArgument } from '../commands/generic-transformers';
|
||||
import { PooledClientSideCacheProvider } from '../client/cache';
|
||||
interface ClientInfo {
|
||||
id: number;
|
||||
}
|
||||
export declare class RedisSentinelClient<M extends RedisModules, F extends RedisFunctions, S extends RedisScripts, RESP extends RespVersions, TYPE_MAPPING extends TypeMapping> {
|
||||
#private;
|
||||
readonly _self: RedisSentinelClient<M, F, S, RESP, TYPE_MAPPING>;
|
||||
/**
|
||||
* Indicates if the client connection is open
|
||||
*
|
||||
* @returns `true` if the client connection is open, `false` otherwise
|
||||
*/
|
||||
get isOpen(): boolean;
|
||||
/**
|
||||
* Indicates if the client connection is ready to accept commands
|
||||
*
|
||||
* @returns `true` if the client connection is ready, `false` otherwise
|
||||
*/
|
||||
get isReady(): boolean;
|
||||
/**
|
||||
* Gets the command options configured for this client
|
||||
*
|
||||
* @returns The command options for this client or `undefined` if none were set
|
||||
*/
|
||||
get commandOptions(): CommandOptions<TYPE_MAPPING> | undefined;
|
||||
constructor(internal: RedisSentinelInternal<M, F, S, RESP, TYPE_MAPPING>, clientInfo: ClientInfo, commandOptions?: CommandOptions<TYPE_MAPPING>);
|
||||
static factory<M extends RedisModules = {}, F extends RedisFunctions = {}, S extends RedisScripts = {}, RESP extends RespVersions = 2, TYPE_MAPPING extends TypeMapping = {}>(config?: SentinelCommander<M, F, S, RESP, TYPE_MAPPING>): (internal: RedisSentinelInternal<M, F, S, RESP, TYPE_MAPPING>, clientInfo: ClientInfo, commandOptions?: CommandOptions<TYPE_MAPPING>) => RedisSentinelClientType<M, F, S, RESP, TYPE_MAPPING>;
|
||||
static create<M extends RedisModules = {}, F extends RedisFunctions = {}, S extends RedisScripts = {}, RESP extends RespVersions = 2, TYPE_MAPPING extends TypeMapping = {}>(options: RedisSentinelOptions<M, F, S, RESP, TYPE_MAPPING>, internal: RedisSentinelInternal<M, F, S, RESP, TYPE_MAPPING>, clientInfo: ClientInfo, commandOptions?: CommandOptions<TYPE_MAPPING>): RedisSentinelClientType<M, F, S, RESP, TYPE_MAPPING>;
|
||||
withCommandOptions<OPTIONS extends CommandOptions<TYPE_MAPPING>, TYPE_MAPPING extends TypeMapping>(options: OPTIONS): RedisSentinelClientType<M, F, S, RESP, TYPE_MAPPING extends TypeMapping ? TYPE_MAPPING : {}>;
|
||||
private _commandOptionsProxy;
|
||||
/**
|
||||
* Override the `typeMapping` command option
|
||||
*/
|
||||
withTypeMapping<TYPE_MAPPING extends TypeMapping>(typeMapping: TYPE_MAPPING): RedisSentinelClientType<M, F, S, RESP, TYPE_MAPPING extends TypeMapping ? TYPE_MAPPING : {}>;
|
||||
_execute<T>(isReadonly: boolean | undefined, fn: (client: RedisClient<RedisModules, RedisFunctions, RedisScripts, RespVersions, TypeMapping>) => Promise<T>): Promise<T>;
|
||||
sendCommand<T = ReplyUnion>(isReadonly: boolean | undefined, args: CommandArguments, options?: CommandOptions): Promise<T>;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
_executePipeline(isReadonly: boolean | undefined, commands: Array<RedisMultiQueuedCommand>): Promise<unknown[]>;
|
||||
/**f
|
||||
* @internal
|
||||
*/
|
||||
_executeMulti(isReadonly: boolean | undefined, commands: Array<RedisMultiQueuedCommand>): Promise<unknown[]>;
|
||||
MULTI(): RedisSentinelMultiCommandType<[], M, F, S, RESP, TYPE_MAPPING>;
|
||||
multi: () => RedisSentinelMultiCommandType<[], M, F, S, RESP, TYPE_MAPPING>;
|
||||
WATCH(key: RedisVariadicArgument): Promise<"OK">;
|
||||
watch: (key: RedisVariadicArgument) => Promise<"OK">;
|
||||
UNWATCH(): Promise<"OK">;
|
||||
unwatch: () => Promise<"OK">;
|
||||
/**
|
||||
* Releases the client lease back to the pool
|
||||
*
|
||||
* After calling this method, the client instance should no longer be used as it
|
||||
* will be returned to the client pool and may be given to other operations.
|
||||
*
|
||||
* @returns A promise that resolves when the client is ready to be reused, or undefined
|
||||
* if the client was immediately ready
|
||||
* @throws Error if the lease has already been released
|
||||
*/
|
||||
release(): Promise<void> | undefined;
|
||||
}
|
||||
export default class RedisSentinel<M extends RedisModules, F extends RedisFunctions, S extends RedisScripts, RESP extends RespVersions, TYPE_MAPPING extends TypeMapping> extends EventEmitter {
|
||||
#private;
|
||||
readonly _self: RedisSentinel<M, F, S, RESP, TYPE_MAPPING>;
|
||||
/**
|
||||
* Indicates if the sentinel connection is open
|
||||
*
|
||||
* @returns `true` if the sentinel connection is open, `false` otherwise
|
||||
*/
|
||||
get isOpen(): boolean;
|
||||
/**
|
||||
* Indicates if the sentinel connection is ready to accept commands
|
||||
*
|
||||
* @returns `true` if the sentinel connection is ready, `false` otherwise
|
||||
*/
|
||||
get isReady(): boolean;
|
||||
get commandOptions(): CommandOptions<TYPE_MAPPING> | undefined;
|
||||
get clientSideCache(): PooledClientSideCacheProvider | undefined;
|
||||
constructor(options: RedisSentinelOptions<M, F, S, RESP, TYPE_MAPPING>);
|
||||
static factory<M extends RedisModules = {}, F extends RedisFunctions = {}, S extends RedisScripts = {}, RESP extends RespVersions = 2, TYPE_MAPPING extends TypeMapping = {}>(config?: SentinelCommander<M, F, S, RESP, TYPE_MAPPING>): (options: Omit<RedisSentinelOptions, keyof Exclude<typeof config, undefined>>) => RedisSentinelType<M, F, S, RESP, TYPE_MAPPING>;
|
||||
static create<M extends RedisModules = {}, F extends RedisFunctions = {}, S extends RedisScripts = {}, RESP extends RespVersions = 2, TYPE_MAPPING extends TypeMapping = {}>(options: RedisSentinelOptions<M, F, S, RESP, TYPE_MAPPING>): RedisSentinelType<M, F, S, RESP, TYPE_MAPPING>;
|
||||
withCommandOptions<OPTIONS extends CommandOptions<TYPE_MAPPING>, TYPE_MAPPING extends TypeMapping>(options: OPTIONS): RedisSentinelType<M, F, S, RESP, TYPE_MAPPING extends TypeMapping ? TYPE_MAPPING : {}>;
|
||||
private _commandOptionsProxy;
|
||||
/**
|
||||
* Override the `typeMapping` command option
|
||||
*/
|
||||
withTypeMapping<TYPE_MAPPING extends TypeMapping>(typeMapping: TYPE_MAPPING): RedisSentinelType<M, F, S, RESP, TYPE_MAPPING extends TypeMapping ? TYPE_MAPPING : {}>;
|
||||
connect(): Promise<RedisSentinelType<M, F, S, RESP, TYPE_MAPPING>>;
|
||||
_execute<T>(isReadonly: boolean | undefined, fn: (client: RedisClient<RedisModules, RedisFunctions, RedisScripts, RespVersions, TypeMapping>) => Promise<T>): Promise<T>;
|
||||
use<T>(fn: (sentinelClient: RedisSentinelClientType<M, F, S, RESP, TYPE_MAPPING>) => Promise<T>): Promise<T>;
|
||||
sendCommand<T = ReplyUnion>(isReadonly: boolean | undefined, args: CommandArguments, options?: CommandOptions): Promise<T>;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
_executePipeline(isReadonly: boolean | undefined, commands: Array<RedisMultiQueuedCommand>): Promise<unknown[]>;
|
||||
/**f
|
||||
* @internal
|
||||
*/
|
||||
_executeMulti(isReadonly: boolean | undefined, commands: Array<RedisMultiQueuedCommand>): Promise<unknown[]>;
|
||||
MULTI(): RedisSentinelMultiCommandType<[], M, F, S, RESP, TYPE_MAPPING>;
|
||||
multi: () => RedisSentinelMultiCommandType<[], M, F, S, RESP, TYPE_MAPPING>;
|
||||
close(): Promise<void>;
|
||||
destroy(): Promise<void>;
|
||||
SUBSCRIBE<T extends boolean = false>(channels: string | Array<string>, listener: PubSubListener<T>, bufferMode?: T): Promise<void | undefined>;
|
||||
subscribe: <T extends boolean = false>(channels: string | Array<string>, listener: PubSubListener<T>, bufferMode?: T | undefined) => Promise<void | undefined>;
|
||||
UNSUBSCRIBE<T extends boolean = false>(channels?: string | Array<string>, listener?: PubSubListener<boolean>, bufferMode?: T): Promise<void | undefined>;
|
||||
unsubscribe: <T extends boolean = false>(channels?: string | Array<string>, listener?: PubSubListener<boolean>, bufferMode?: T | undefined) => Promise<void | undefined>;
|
||||
PSUBSCRIBE<T extends boolean = false>(patterns: string | Array<string>, listener: PubSubListener<T>, bufferMode?: T): Promise<void | undefined>;
|
||||
pSubscribe: <T extends boolean = false>(patterns: string | Array<string>, listener: PubSubListener<T>, bufferMode?: T | undefined) => Promise<void | undefined>;
|
||||
PUNSUBSCRIBE<T extends boolean = false>(patterns?: string | Array<string>, listener?: PubSubListener<T>, bufferMode?: T): Promise<void | undefined>;
|
||||
pUnsubscribe: <T extends boolean = false>(patterns?: string | Array<string>, listener?: PubSubListener<T> | undefined, bufferMode?: T | undefined) => Promise<void | undefined>;
|
||||
/**
|
||||
* Acquires a master client lease for exclusive operations
|
||||
*
|
||||
* Used when multiple commands need to run on an exclusive client (for example, using `WATCH/MULTI/EXEC`).
|
||||
* The returned client must be released after use with the `release()` method.
|
||||
*
|
||||
* @returns A promise that resolves to a Redis client connected to the master node
|
||||
* @example
|
||||
* ```javascript
|
||||
* const clientLease = await sentinel.acquire();
|
||||
*
|
||||
* try {
|
||||
* await clientLease.watch('key');
|
||||
* const resp = await clientLease.multi()
|
||||
* .get('key')
|
||||
* .exec();
|
||||
* } finally {
|
||||
* clientLease.release();
|
||||
* }
|
||||
* ```
|
||||
*/
|
||||
acquire(): Promise<RedisSentinelClientType<M, F, S, RESP, TYPE_MAPPING>>;
|
||||
getSentinelNode(): RedisNode | undefined;
|
||||
getMasterNode(): RedisNode | undefined;
|
||||
getReplicaNodes(): Map<RedisNode, number>;
|
||||
setTracer(tracer?: Array<string>): void;
|
||||
}
|
||||
declare class RedisSentinelInternal<M extends RedisModules, F extends RedisFunctions, S extends RedisScripts, RESP extends RespVersions, TYPE_MAPPING extends TypeMapping> extends EventEmitter {
|
||||
#private;
|
||||
get isOpen(): boolean;
|
||||
get isReady(): boolean;
|
||||
get useReplicas(): boolean;
|
||||
get clientSideCache(): PooledClientSideCacheProvider | undefined;
|
||||
constructor(options: RedisSentinelOptions<M, F, S, RESP, TYPE_MAPPING>);
|
||||
/**
|
||||
* Gets a client lease from the master client pool
|
||||
*
|
||||
* @returns A client info object or a promise that resolves to a client info object
|
||||
* when a client becomes available
|
||||
*/
|
||||
getClientLease(): ClientInfo | Promise<ClientInfo>;
|
||||
/**
|
||||
* Releases a client lease back to the pool
|
||||
*
|
||||
* If the client was used for a transaction that might have left it in a dirty state,
|
||||
* it will be reset before being returned to the pool.
|
||||
*
|
||||
* @param clientInfo The client info object representing the client to release
|
||||
* @returns A promise that resolves when the client is ready to be reused, or undefined
|
||||
* if the client was immediately ready or no longer exists
|
||||
*/
|
||||
releaseClientLease(clientInfo: ClientInfo): Promise<void> | undefined;
|
||||
connect(): Promise<void>;
|
||||
execute<T>(fn: (client: RedisClientType<RedisModules, RedisFunctions, RedisScripts, RespVersions, TypeMapping>) => Promise<T>, clientInfo?: ClientInfo): Promise<T>;
|
||||
close(): Promise<void>;
|
||||
destroy(): Promise<void>;
|
||||
subscribe<T extends boolean = false>(channels: string | Array<string>, listener: PubSubListener<T>, bufferMode?: T): Promise<void | undefined>;
|
||||
unsubscribe<T extends boolean = false>(channels?: string | Array<string>, listener?: PubSubListener<boolean>, bufferMode?: T): Promise<void | undefined>;
|
||||
pSubscribe<T extends boolean = false>(patterns: string | Array<string>, listener: PubSubListener<T>, bufferMode?: T): Promise<void | undefined>;
|
||||
pUnsubscribe<T extends boolean = false>(patterns?: string | Array<string>, listener?: PubSubListener<T>, bufferMode?: T): Promise<void | undefined>;
|
||||
observe(): Promise<{
|
||||
sentinelConnected: RedisNode;
|
||||
sentinelData: {
|
||||
[x: string]: string;
|
||||
}[];
|
||||
masterData: {
|
||||
[x: string]: string;
|
||||
};
|
||||
replicaData: {
|
||||
[x: string]: string;
|
||||
}[];
|
||||
currentMaster: RedisNode | undefined;
|
||||
currentReplicas: Map<RedisNode, number>;
|
||||
currentSentinel: RedisNode | undefined;
|
||||
replicaPoolSize: number;
|
||||
useReplicas: boolean;
|
||||
}>;
|
||||
analyze(observed: Awaited<ReturnType<RedisSentinelInternal<M, F, S, RESP, TYPE_MAPPING>["observe"]>>): {
|
||||
sentinelList: RedisNode[];
|
||||
epoch: number;
|
||||
sentinelToOpen: RedisNode | undefined;
|
||||
masterToOpen: RedisNode | undefined;
|
||||
replicasToClose: RedisNode[];
|
||||
replicasToOpen: Map<RedisNode, number>;
|
||||
};
|
||||
transform(analyzed: ReturnType<RedisSentinelInternal<M, F, S, RESP, TYPE_MAPPING>["analyze"]>): Promise<void>;
|
||||
getMasterNode(): RedisNode | undefined;
|
||||
getSentinelNode(): RedisNode | undefined;
|
||||
getReplicaNodes(): Map<RedisNode, number>;
|
||||
setTracer(tracer?: Array<string>): void;
|
||||
}
|
||||
export declare class RedisSentinelFactory extends EventEmitter {
|
||||
#private;
|
||||
options: RedisSentinelOptions;
|
||||
constructor(options: RedisSentinelOptions);
|
||||
updateSentinelRootNodes(): Promise<void>;
|
||||
getMasterNode(): Promise<RedisNode>;
|
||||
getMasterClient(): Promise<RedisClientType<RedisModules, RedisFunctions, RedisScripts, 2 | 3, TypeMapping>>;
|
||||
getReplicaNodes(): Promise<RedisNode[]>;
|
||||
getReplicaClient(): Promise<RedisClientType<RedisModules, RedisFunctions, RedisScripts, 2 | 3, TypeMapping>>;
|
||||
}
|
||||
export {};
|
||||
//# sourceMappingURL=index.d.ts.map
|
||||
1
node_modules/@redis/client/dist/lib/sentinel/index.d.ts.map
generated
vendored
Normal file
1
node_modules/@redis/client/dist/lib/sentinel/index.d.ts.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
1178
node_modules/@redis/client/dist/lib/sentinel/index.js
generated
vendored
Normal file
1178
node_modules/@redis/client/dist/lib/sentinel/index.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1
node_modules/@redis/client/dist/lib/sentinel/index.js.map
generated
vendored
Normal file
1
node_modules/@redis/client/dist/lib/sentinel/index.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
64
node_modules/@redis/client/dist/lib/sentinel/module.d.ts
generated
vendored
Normal file
64
node_modules/@redis/client/dist/lib/sentinel/module.d.ts
generated
vendored
Normal file
@@ -0,0 +1,64 @@
|
||||
declare const _default: {
|
||||
readonly sentinel: {
|
||||
readonly SENTINEL_SENTINELS: {
|
||||
readonly parseCommand: (this: void, parser: import("../..").CommandParser, dbname: import("../RESP/types").RedisArgument) => void;
|
||||
readonly transformReply: {
|
||||
readonly 2: (reply: import("../RESP/types").ArrayReply<import("../RESP/types").ArrayReply<import("../RESP/types").BlobStringReply<string>>>, preserve?: any, typeMapping?: import("../RESP/types").TypeMapping | undefined) => import("../RESP/types").MapReply<import("../RESP/types").BlobStringReply<string>, import("../RESP/types").BlobStringReply<string>>[];
|
||||
readonly 3: () => import("../RESP/types").ArrayReply<import("../RESP/types").MapReply<import("../RESP/types").BlobStringReply<string>, import("../RESP/types").BlobStringReply<string>>>;
|
||||
};
|
||||
};
|
||||
readonly sentinelSentinels: {
|
||||
readonly parseCommand: (this: void, parser: import("../..").CommandParser, dbname: import("../RESP/types").RedisArgument) => void;
|
||||
readonly transformReply: {
|
||||
readonly 2: (reply: import("../RESP/types").ArrayReply<import("../RESP/types").ArrayReply<import("../RESP/types").BlobStringReply<string>>>, preserve?: any, typeMapping?: import("../RESP/types").TypeMapping | undefined) => import("../RESP/types").MapReply<import("../RESP/types").BlobStringReply<string>, import("../RESP/types").BlobStringReply<string>>[];
|
||||
readonly 3: () => import("../RESP/types").ArrayReply<import("../RESP/types").MapReply<import("../RESP/types").BlobStringReply<string>, import("../RESP/types").BlobStringReply<string>>>;
|
||||
};
|
||||
};
|
||||
readonly SENTINEL_MASTER: {
|
||||
readonly parseCommand: (this: void, parser: import("../..").CommandParser, dbname: import("../RESP/types").RedisArgument) => void;
|
||||
readonly transformReply: {
|
||||
readonly 2: (reply: import("../RESP/types").ArrayReply<import("../RESP/types").BlobStringReply<string>>, preserve?: any, typeMapping?: import("../RESP/types").TypeMapping | undefined) => import("../RESP/types").MapReply<import("../RESP/types").BlobStringReply<string>, import("../RESP/types").BlobStringReply<string>>;
|
||||
readonly 3: () => import("../RESP/types").MapReply<import("../RESP/types").BlobStringReply<string>, import("../RESP/types").BlobStringReply<string>>;
|
||||
};
|
||||
};
|
||||
readonly sentinelMaster: {
|
||||
readonly parseCommand: (this: void, parser: import("../..").CommandParser, dbname: import("../RESP/types").RedisArgument) => void;
|
||||
readonly transformReply: {
|
||||
readonly 2: (reply: import("../RESP/types").ArrayReply<import("../RESP/types").BlobStringReply<string>>, preserve?: any, typeMapping?: import("../RESP/types").TypeMapping | undefined) => import("../RESP/types").MapReply<import("../RESP/types").BlobStringReply<string>, import("../RESP/types").BlobStringReply<string>>;
|
||||
readonly 3: () => import("../RESP/types").MapReply<import("../RESP/types").BlobStringReply<string>, import("../RESP/types").BlobStringReply<string>>;
|
||||
};
|
||||
};
|
||||
readonly SENTINEL_REPLICAS: {
|
||||
readonly parseCommand: (this: void, parser: import("../..").CommandParser, dbname: import("../RESP/types").RedisArgument) => void;
|
||||
readonly transformReply: {
|
||||
readonly 2: (reply: import("../RESP/types").ArrayReply<import("../RESP/types").ArrayReply<import("../RESP/types").BlobStringReply<string>>>, preserve?: any, typeMapping?: import("../RESP/types").TypeMapping | undefined) => import("../RESP/types").MapReply<import("../RESP/types").BlobStringReply<string>, import("../RESP/types").BlobStringReply<string>>[];
|
||||
readonly 3: () => import("../RESP/types").ArrayReply<import("../RESP/types").MapReply<import("../RESP/types").BlobStringReply<string>, import("../RESP/types").BlobStringReply<string>>>;
|
||||
};
|
||||
};
|
||||
readonly sentinelReplicas: {
|
||||
readonly parseCommand: (this: void, parser: import("../..").CommandParser, dbname: import("../RESP/types").RedisArgument) => void;
|
||||
readonly transformReply: {
|
||||
readonly 2: (reply: import("../RESP/types").ArrayReply<import("../RESP/types").ArrayReply<import("../RESP/types").BlobStringReply<string>>>, preserve?: any, typeMapping?: import("../RESP/types").TypeMapping | undefined) => import("../RESP/types").MapReply<import("../RESP/types").BlobStringReply<string>, import("../RESP/types").BlobStringReply<string>>[];
|
||||
readonly 3: () => import("../RESP/types").ArrayReply<import("../RESP/types").MapReply<import("../RESP/types").BlobStringReply<string>, import("../RESP/types").BlobStringReply<string>>>;
|
||||
};
|
||||
};
|
||||
readonly SENTINEL_MONITOR: {
|
||||
readonly parseCommand: (this: void, parser: import("../..").CommandParser, dbname: import("../RESP/types").RedisArgument, host: import("../RESP/types").RedisArgument, port: import("../RESP/types").RedisArgument, quorum: import("../RESP/types").RedisArgument) => void;
|
||||
readonly transformReply: () => import("../RESP/types").SimpleStringReply<"OK">;
|
||||
};
|
||||
readonly sentinelMonitor: {
|
||||
readonly parseCommand: (this: void, parser: import("../..").CommandParser, dbname: import("../RESP/types").RedisArgument, host: import("../RESP/types").RedisArgument, port: import("../RESP/types").RedisArgument, quorum: import("../RESP/types").RedisArgument) => void;
|
||||
readonly transformReply: () => import("../RESP/types").SimpleStringReply<"OK">;
|
||||
};
|
||||
readonly SENTINEL_SET: {
|
||||
readonly parseCommand: (this: void, parser: import("../..").CommandParser, dbname: import("../RESP/types").RedisArgument, options: import("./commands/SENTINEL_SET").SentinelSetOptions) => void;
|
||||
readonly transformReply: () => import("../RESP/types").SimpleStringReply<"OK">;
|
||||
};
|
||||
readonly sentinelSet: {
|
||||
readonly parseCommand: (this: void, parser: import("../..").CommandParser, dbname: import("../RESP/types").RedisArgument, options: import("./commands/SENTINEL_SET").SentinelSetOptions) => void;
|
||||
readonly transformReply: () => import("../RESP/types").SimpleStringReply<"OK">;
|
||||
};
|
||||
};
|
||||
};
|
||||
export default _default;
|
||||
//# sourceMappingURL=module.d.ts.map
|
||||
1
node_modules/@redis/client/dist/lib/sentinel/module.d.ts.map
generated
vendored
Normal file
1
node_modules/@redis/client/dist/lib/sentinel/module.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../../../lib/sentinel/module.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,wBAEkC"}
|
||||
10
node_modules/@redis/client/dist/lib/sentinel/module.js
generated
vendored
Normal file
10
node_modules/@redis/client/dist/lib/sentinel/module.js
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
"use strict";
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const commands_1 = __importDefault(require("./commands"));
|
||||
exports.default = {
|
||||
sentinel: commands_1.default
|
||||
};
|
||||
//# sourceMappingURL=module.js.map
|
||||
1
node_modules/@redis/client/dist/lib/sentinel/module.js.map
generated
vendored
Normal file
1
node_modules/@redis/client/dist/lib/sentinel/module.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"module.js","sourceRoot":"","sources":["../../../lib/sentinel/module.ts"],"names":[],"mappings":";;;;;AAEA,0DAAkC;AAElC,kBAAe;IACb,QAAQ,EAAR,kBAAQ;CACuB,CAAC"}
|
||||
43
node_modules/@redis/client/dist/lib/sentinel/multi-commands.d.ts
generated
vendored
Normal file
43
node_modules/@redis/client/dist/lib/sentinel/multi-commands.d.ts
generated
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
import COMMANDS from '../commands';
|
||||
import { MULTI_REPLY, MultiReply, MultiReplyType } from '../multi-command';
|
||||
import { ReplyWithTypeMapping, CommandReply, Command, CommandArguments, CommanderConfig, RedisFunctions, RedisModules, RedisScripts, RespVersions, TransformReply, TypeMapping } from '../RESP/types';
|
||||
import { RedisSentinelType } from './types';
|
||||
import { Tail } from '../commands/generic-transformers';
|
||||
type CommandSignature<REPLIES extends Array<unknown>, C extends Command, M extends RedisModules, F extends RedisFunctions, S extends RedisScripts, RESP extends RespVersions, TYPE_MAPPING extends TypeMapping> = (...args: Tail<Parameters<C['parseCommand']>>) => RedisSentinelMultiCommandType<[
|
||||
...REPLIES,
|
||||
ReplyWithTypeMapping<CommandReply<C, RESP>, TYPE_MAPPING>
|
||||
], M, F, S, RESP, TYPE_MAPPING>;
|
||||
type WithCommands<REPLIES extends Array<unknown>, M extends RedisModules, F extends RedisFunctions, S extends RedisScripts, RESP extends RespVersions, TYPE_MAPPING extends TypeMapping> = {
|
||||
[P in keyof typeof COMMANDS]: CommandSignature<REPLIES, (typeof COMMANDS)[P], M, F, S, RESP, TYPE_MAPPING>;
|
||||
};
|
||||
type WithModules<REPLIES extends Array<unknown>, M extends RedisModules, F extends RedisFunctions, S extends RedisScripts, RESP extends RespVersions, TYPE_MAPPING extends TypeMapping> = {
|
||||
[P in keyof M]: {
|
||||
[C in keyof M[P]]: CommandSignature<REPLIES, M[P][C], M, F, S, RESP, TYPE_MAPPING>;
|
||||
};
|
||||
};
|
||||
type WithFunctions<REPLIES extends Array<unknown>, M extends RedisModules, F extends RedisFunctions, S extends RedisScripts, RESP extends RespVersions, TYPE_MAPPING extends TypeMapping> = {
|
||||
[L in keyof F]: {
|
||||
[C in keyof F[L]]: CommandSignature<REPLIES, F[L][C], M, F, S, RESP, TYPE_MAPPING>;
|
||||
};
|
||||
};
|
||||
type WithScripts<REPLIES extends Array<unknown>, M extends RedisModules, F extends RedisFunctions, S extends RedisScripts, RESP extends RespVersions, TYPE_MAPPING extends TypeMapping> = {
|
||||
[P in keyof S]: CommandSignature<REPLIES, S[P], M, F, S, RESP, TYPE_MAPPING>;
|
||||
};
|
||||
export type RedisSentinelMultiCommandType<REPLIES extends Array<any>, M extends RedisModules, F extends RedisFunctions, S extends RedisScripts, RESP extends RespVersions, TYPE_MAPPING extends TypeMapping> = (RedisSentinelMultiCommand<REPLIES> & WithCommands<REPLIES, M, F, S, RESP, TYPE_MAPPING> & WithModules<REPLIES, M, F, S, RESP, TYPE_MAPPING> & WithFunctions<REPLIES, M, F, S, RESP, TYPE_MAPPING> & WithScripts<REPLIES, M, F, S, RESP, TYPE_MAPPING>);
|
||||
export default class RedisSentinelMultiCommand<REPLIES = []> {
|
||||
#private;
|
||||
private static _createCommand;
|
||||
private static _createModuleCommand;
|
||||
private static _createFunctionCommand;
|
||||
private static _createScriptCommand;
|
||||
static extend<M extends RedisModules = Record<string, never>, F extends RedisFunctions = Record<string, never>, S extends RedisScripts = Record<string, never>, RESP extends RespVersions = 2>(config?: CommanderConfig<M, F, S, RESP>): any;
|
||||
constructor(sentinel: RedisSentinelType, typeMapping: TypeMapping);
|
||||
addCommand(isReadonly: boolean | undefined, args: CommandArguments, transformReply?: TransformReply): this;
|
||||
exec<T extends MultiReply = MULTI_REPLY['GENERIC']>(execAsPipeline?: boolean): Promise<MultiReplyType<T, REPLIES>>;
|
||||
EXEC: <T extends MultiReply = "generic">(execAsPipeline?: boolean) => Promise<MultiReplyType<T, REPLIES>>;
|
||||
execTyped(execAsPipeline?: boolean): Promise<REPLIES>;
|
||||
execAsPipeline<T extends MultiReply = MULTI_REPLY['GENERIC']>(): Promise<MultiReplyType<T, REPLIES>>;
|
||||
execAsPipelineTyped(): Promise<REPLIES>;
|
||||
}
|
||||
export {};
|
||||
//# sourceMappingURL=multi-commands.d.ts.map
|
||||
1
node_modules/@redis/client/dist/lib/sentinel/multi-commands.d.ts.map
generated
vendored
Normal file
1
node_modules/@redis/client/dist/lib/sentinel/multi-commands.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"multi-commands.d.ts","sourceRoot":"","sources":["../../../lib/sentinel/multi-commands.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,aAAa,CAAC;AACnC,OAA0B,EAAE,WAAW,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAC9F,OAAO,EAAE,oBAAoB,EAAE,YAAY,EAAE,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,cAAc,EAAE,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,cAAc,EAA8B,WAAW,EAAE,MAAM,eAAe,CAAC;AAElO,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAE5C,OAAO,EAAE,IAAI,EAAE,MAAM,kCAAkC,CAAC;AAExD,KAAK,gBAAgB,CACnB,OAAO,SAAS,KAAK,CAAC,OAAO,CAAC,EAC9B,CAAC,SAAS,OAAO,EACjB,CAAC,SAAS,YAAY,EACtB,CAAC,SAAS,cAAc,EACxB,CAAC,SAAS,Y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,EAAE,CAAC,EAAE,IAAI,EAAE,YAAY,CAAC,CAClD,CAAC;AAEF,MAAM,CAAC,OAAO,OAAO,yBAAyB,CAAC,OAAO,GAAG,EAAE;;IACzD,OAAO,CAAC,MAAM,CAAC,cAAc;IAkB7B,OAAO,CAAC,MAAM,CAAC,oBAAoB;IAkBnC,OAAO,CAAC,MAAM,CAAC,sBAAsB;IAoBrC,OAAO,CAAC,MAAM,CAAC,oBAAoB;IAmBnC,MAAM,CAAC,MAAM,CACX,CAAC,SAAS,YAAY,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,EAC9C,CAAC,SAAS,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,EAChD,CAAC,SAAS,YAAY,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,EAC9C,IAAI,SAAS,YAAY,GAAG,CAAC,EAC7B,MAAM,CAAC,EAAE,eAAe,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,IAAI,CAAC;gBAgB7B,QAAQ,EAAE,iBAAiB,EAAE,WAAW,EAAE,WAAW;IAWjE,UAAU,CACR,UAAU,EAAE,OAAO,GAAG,SAAS,EAC/B,IAAI,EAAE,gBAAgB,EACtB,cAAc,CAAC,EAAE,cAAc;IAmB3B,IAAI,CAAC,CAAC,SAAS,UAAU,GAAG,WAAW,CAAC,SAAS,CAAC,EAAE,cAAc,UAAQ;IAWhF,IAAI,sGAAa;IAEjB,SAAS,CAAC,cAAc,UAAQ;IAI1B,cAAc,CAAC,CAAC,SAAS,UAAU,GAAG,WAAW,CAAC,SAAS,CAAC;IAWlE,mBAAmB;CAGpB"}
|
||||
103
node_modules/@redis/client/dist/lib/sentinel/multi-commands.js
generated
vendored
Normal file
103
node_modules/@redis/client/dist/lib/sentinel/multi-commands.js
generated
vendored
Normal file
@@ -0,0 +1,103 @@
|
||||
"use strict";
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const commands_1 = __importDefault(require("../commands"));
|
||||
const multi_command_1 = __importDefault(require("../multi-command"));
|
||||
const commander_1 = require("../commander");
|
||||
const parser_1 = require("../client/parser");
|
||||
class RedisSentinelMultiCommand {
|
||||
static _createCommand(command, resp) {
|
||||
const transformReply = (0, commander_1.getTransformReply)(command, resp);
|
||||
return function (...args) {
|
||||
const parser = new parser_1.BasicCommandParser();
|
||||
command.parseCommand(parser, ...args);
|
||||
const redisArgs = parser.redisArgs;
|
||||
redisArgs.preserve = parser.preserve;
|
||||
return this.addCommand(command.IS_READ_ONLY, redisArgs, transformReply);
|
||||
};
|
||||
}
|
||||
static _createModuleCommand(command, resp) {
|
||||
const transformReply = (0, commander_1.getTransformReply)(command, resp);
|
||||
return function (...args) {
|
||||
const parser = new parser_1.BasicCommandParser();
|
||||
command.parseCommand(parser, ...args);
|
||||
const redisArgs = parser.redisArgs;
|
||||
redisArgs.preserve = parser.preserve;
|
||||
return this._self.addCommand(command.IS_READ_ONLY, redisArgs, transformReply);
|
||||
};
|
||||
}
|
||||
static _createFunctionCommand(name, fn, resp) {
|
||||
const prefix = (0, commander_1.functionArgumentsPrefix)(name, fn);
|
||||
const transformReply = (0, commander_1.getTransformReply)(fn, resp);
|
||||
return function (...args) {
|
||||
const parser = new parser_1.BasicCommandParser();
|
||||
parser.push(...prefix);
|
||||
fn.parseCommand(parser, ...args);
|
||||
const redisArgs = parser.redisArgs;
|
||||
redisArgs.preserve = parser.preserve;
|
||||
return this._self.addCommand(fn.IS_READ_ONLY, redisArgs, transformReply);
|
||||
};
|
||||
}
|
||||
static _createScriptCommand(script, resp) {
|
||||
const transformReply = (0, commander_1.getTransformReply)(script, resp);
|
||||
return function (...args) {
|
||||
const parser = new parser_1.BasicCommandParser();
|
||||
script.parseCommand(parser, ...args);
|
||||
const scriptArgs = parser.redisArgs;
|
||||
scriptArgs.preserve = parser.preserve;
|
||||
return this.#addScript(script.IS_READ_ONLY, script, scriptArgs, transformReply);
|
||||
};
|
||||
}
|
||||
static extend(config) {
|
||||
return (0, commander_1.attachConfig)({
|
||||
BaseClass: RedisSentinelMultiCommand,
|
||||
commands: commands_1.default,
|
||||
createCommand: RedisSentinelMultiCommand._createCommand,
|
||||
createModuleCommand: RedisSentinelMultiCommand._createModuleCommand,
|
||||
createFunctionCommand: RedisSentinelMultiCommand._createFunctionCommand,
|
||||
createScriptCommand: RedisSentinelMultiCommand._createScriptCommand,
|
||||
config
|
||||
});
|
||||
}
|
||||
#multi = new multi_command_1.default();
|
||||
#sentinel;
|
||||
#isReadonly = true;
|
||||
constructor(sentinel, typeMapping) {
|
||||
this.#multi = new multi_command_1.default(typeMapping);
|
||||
this.#sentinel = sentinel;
|
||||
}
|
||||
#setState(isReadonly) {
|
||||
this.#isReadonly &&= isReadonly;
|
||||
}
|
||||
addCommand(isReadonly, args, transformReply) {
|
||||
this.#setState(isReadonly);
|
||||
this.#multi.addCommand(args, transformReply);
|
||||
return this;
|
||||
}
|
||||
#addScript(isReadonly, script, args, transformReply) {
|
||||
this.#setState(isReadonly);
|
||||
this.#multi.addScript(script, args, transformReply);
|
||||
return this;
|
||||
}
|
||||
async exec(execAsPipeline = false) {
|
||||
if (execAsPipeline)
|
||||
return this.execAsPipeline();
|
||||
return this.#multi.transformReplies(await this.#sentinel._executeMulti(this.#isReadonly, this.#multi.queue));
|
||||
}
|
||||
EXEC = this.exec;
|
||||
execTyped(execAsPipeline = false) {
|
||||
return this.exec(execAsPipeline);
|
||||
}
|
||||
async execAsPipeline() {
|
||||
if (this.#multi.queue.length === 0)
|
||||
return [];
|
||||
return this.#multi.transformReplies(await this.#sentinel._executePipeline(this.#isReadonly, this.#multi.queue));
|
||||
}
|
||||
execAsPipelineTyped() {
|
||||
return this.execAsPipeline();
|
||||
}
|
||||
}
|
||||
exports.default = RedisSentinelMultiCommand;
|
||||
//# sourceMappingURL=multi-commands.js.map
|
||||
1
node_modules/@redis/client/dist/lib/sentinel/multi-commands.js.map
generated
vendored
Normal file
1
node_modules/@redis/client/dist/lib/sentinel/multi-commands.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"multi-commands.js","sourceRoot":"","sources":["../../../lib/sentinel/multi-commands.ts"],"names":[],"mappings":";;;;;AAAA,2DAAmC;AACnC,qEAA8F;AAE9F,4CAAwF;AAExF,6CAAsD;AAmFtD,MAAqB,yBAAyB;IACpC,MAAM,CAAC,cAAc,CAAC,OAAgB,EAAE,IAAkB;QAChE,MAAM,cAAc,GAAG,IAAA,6BAAiB,EAAC,OAAO,EAAE,IAAI,CAAC,CAAC;QAExD,OAAO,UAA2C,GAAG,IAAoB;YACvE,MAAM,MAAM,GAAG,IAAI,2BAAkB,EAAE,CAAC;YACxC,OAAO,CAAC,YAAY,CAAC,MAAM,EAAE,GAAG,IAAI,CAAC,CAAC;YAEtC,MAAM,SAAS,GAAqB,MAAM,CAAC,SAAS,CAAC;YACrD,SAAS,CAAC,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;YAErC,OAAO,IAAI,CAAC,UAAU,CACpB,OAAO,CAAC,YAAY,EACpB,SAAS,EACT,cAAc,CACf,CAAC;QACJ,CAAC,CAAC;IACJ,CAAC;IAEO,MAAM,CAAC,oBAAoB,CAAC,OAAgB,EAAE,IAAkB;QACtE,MAAM,cAAc,GAAG,IAAA,6BAAiB,EAAC,OAAO,EAAE,IAAI,CAAC,CAAC;QAExD,OAAO,UAAsD,GAAG,IAAoB;YAClF,MAAM,MAAM,GAAG,IAAI,2BAAkB,EAAE,CAAC;YACxC,OAAO,CAAC,YAAY,CAAC,MAAM,EAAE,GAAG,IAAI,CAAC,CAAC;YAEtC,MAAM,SAAS,GAAqB,MAAM,CAAC,SAAS,CAAC;YACrD,SAAS,CAAC,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;YAErC,OAAO,IAAI,CAAC,KAAK,CAAC,UAAU,CAC1B,OAAO,CAAC,YAAY,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AAI,CAAC,MAAM,CAAC,gBAAgB,CACjC,MAAM,IAAI,CAAC,SAAS,CAAC,aAAa,CAChC,IAAI,CAAC,WAAW,EAChB,IAAI,CAAC,MAAM,CAAC,KAAK,CAClB,CAC4B,CAAC;IAClC,CAAC;IAED,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;IAEjB,SAAS,CAAC,cAAc,GAAG,KAAK;QAC9B,OAAO,IAAI,CAAC,IAAI,CAAuB,cAAc,CAAC,CAAC;IACzD,CAAC;IAED,KAAK,CAAC,cAAc;QAClB,IAAI,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,KAAK,CAAC;YAAE,OAAO,EAAgC,CAAC;QAE5E,OAAO,IAAI,CAAC,MAAM,CAAC,gBAAgB,CACjC,MAAM,IAAI,CAAC,SAAS,CAAC,gBAAgB,CACnC,IAAI,CAAC,WAAW,EAChB,IAAI,CAAC,MAAM,CAAC,KAAK,CAClB,CAC4B,CAAC;IAClC,CAAC;IAED,mBAAmB;QACjB,OAAO,IAAI,CAAC,cAAc,EAAwB,CAAC;IACrD,CAAC;CACF;AAjKD,4CAiKC"}
|
||||
18
node_modules/@redis/client/dist/lib/sentinel/pub-sub-proxy.d.ts
generated
vendored
Normal file
18
node_modules/@redis/client/dist/lib/sentinel/pub-sub-proxy.d.ts
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
/// <reference types="node" />
|
||||
import EventEmitter from 'node:events';
|
||||
import { RedisClientOptions } from '../client';
|
||||
import { PubSubListener } from '../client/pub-sub';
|
||||
import { RedisNode } from './types';
|
||||
type OnError = (err: unknown) => unknown;
|
||||
export declare class PubSubProxy extends EventEmitter {
|
||||
#private;
|
||||
constructor(clientOptions: RedisClientOptions, onError: OnError);
|
||||
changeNode(node: RedisNode): Promise<void>;
|
||||
subscribe<T extends boolean = false>(channels: string | Array<string>, listener: PubSubListener<T>, bufferMode?: T): Promise<void> | Promise<Promise<void> | undefined>;
|
||||
unsubscribe<T extends boolean = false>(channels?: string | Array<string>, listener?: PubSubListener<boolean>, bufferMode?: T): Promise<void | undefined>;
|
||||
pSubscribe<T extends boolean = false>(patterns: string | Array<string>, listener: PubSubListener<T>, bufferMode?: T): Promise<void | undefined>;
|
||||
pUnsubscribe<T extends boolean = false>(patterns?: string | Array<string>, listener?: PubSubListener<T>, bufferMode?: T): Promise<void | undefined>;
|
||||
destroy(): void;
|
||||
}
|
||||
export {};
|
||||
//# sourceMappingURL=pub-sub-proxy.d.ts.map
|
||||
1
node_modules/@redis/client/dist/lib/sentinel/pub-sub-proxy.d.ts.map
generated
vendored
Normal file
1
node_modules/@redis/client/dist/lib/sentinel/pub-sub-proxy.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"pub-sub-proxy.d.ts","sourceRoot":"","sources":["../../../lib/sentinel/pub-sub-proxy.ts"],"names":[],"mappings":";AAAA,OAAO,YAAY,MAAM,aAAa,CAAC;AAEvC,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAe,cAAc,EAAuB,MAAM,mBAAmB,CAAC;AACrF,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAqBpC,KAAK,OAAO,GAAG,CAAC,GAAG,EAAE,OAAO,KAAK,OAAO,CAAC;AAEzC,qBAAa,WAAY,SAAQ,YAAY;;gBAQ/B,aAAa,EAAE,kBAAkB,EAAE,OAAO,EAAE,OAAO;IAyEzD,UAAU,CAAC,IAAI,EAAE,SAAS;IAwChC,SAAS,CAAC,CAAC,SAAS,OAAO,GAAG,KAAK,EACjC,QAAQ,EAAE,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,EAChC,QAAQ,EAAE,cAAc,CAAC,CAAC,CAAC,EAC3B,UAAU,CAAC,EAAE,CAAC;IAoBV,WAAW,CAAC,CAAC,SAAS,OAAO,GAAG,KAAK,EACzC,QAAQ,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,EACjC,QAAQ,CAAC,EAAE,cAAc,CAAC,OAAO,CAAC,EAClC,UAAU,CAAC,EAAE,CAAC;IAKV,UAAU,CAAC,CAAC,SAAS,OAAO,GAAG,KAAK,EACxC,QAAQ,EAAE,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,EAChC,QAAQ,EAAE,cAAc,CAAC,CAAC,CAAC,EAC3B,UAAU,CAAC,EAAE,CAAC;IAOV,YAAY,CAAC,CAAC,SAAS,OAAO,GAAG,KAAK,EAC1C,QAAQ,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,EACjC,QAAQ,CAAC,EAAE,cAAc,CAAC,CAAC,CAAC,EAC5B,UAAU,CAAC,EAAE,CAAC;IAKhB,OAAO;CAWR"}
|
||||
142
node_modules/@redis/client/dist/lib/sentinel/pub-sub-proxy.js
generated
vendored
Normal file
142
node_modules/@redis/client/dist/lib/sentinel/pub-sub-proxy.js
generated
vendored
Normal file
@@ -0,0 +1,142 @@
|
||||
"use strict";
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.PubSubProxy = void 0;
|
||||
const node_events_1 = __importDefault(require("node:events"));
|
||||
const pub_sub_1 = require("../client/pub-sub");
|
||||
const client_1 = __importDefault(require("../client"));
|
||||
class PubSubProxy extends node_events_1.default {
|
||||
#clientOptions;
|
||||
#onError;
|
||||
#node;
|
||||
#state;
|
||||
#subscriptions;
|
||||
constructor(clientOptions, onError) {
|
||||
super();
|
||||
this.#clientOptions = clientOptions;
|
||||
this.#onError = onError;
|
||||
}
|
||||
#createClient() {
|
||||
if (this.#node === undefined) {
|
||||
throw new Error("pubSubProxy: didn't define node to do pubsub against");
|
||||
}
|
||||
return new client_1.default({
|
||||
...this.#clientOptions,
|
||||
socket: {
|
||||
...this.#clientOptions.socket,
|
||||
host: this.#node.host,
|
||||
port: this.#node.port
|
||||
}
|
||||
});
|
||||
}
|
||||
async #initiatePubSubClient(withSubscriptions = false) {
|
||||
const client = this.#createClient()
|
||||
.on('error', this.#onError);
|
||||
const connectPromise = client.connect()
|
||||
.then(async (client) => {
|
||||
if (this.#state?.client !== client) {
|
||||
// if pubsub was deactivated while connecting (`this.#pubSubClient === undefined`)
|
||||
// or if the node changed (`this.#pubSubClient.client !== client`)
|
||||
client.destroy();
|
||||
return this.#state?.connectPromise;
|
||||
}
|
||||
if (withSubscriptions && this.#subscriptions) {
|
||||
await Promise.all([
|
||||
client.extendPubSubListeners(pub_sub_1.PUBSUB_TYPE.CHANNELS, this.#subscriptions[pub_sub_1.PUBSUB_TYPE.CHANNELS]),
|
||||
client.extendPubSubListeners(pub_sub_1.PUBSUB_TYPE.PATTERNS, this.#subscriptions[pub_sub_1.PUBSUB_TYPE.PATTERNS])
|
||||
]);
|
||||
}
|
||||
if (this.#state.client !== client) {
|
||||
// if the node changed (`this.#pubSubClient.client !== client`)
|
||||
client.destroy();
|
||||
return this.#state?.connectPromise;
|
||||
}
|
||||
this.#state.connectPromise = undefined;
|
||||
return client;
|
||||
})
|
||||
.catch(err => {
|
||||
this.#state = undefined;
|
||||
throw err;
|
||||
});
|
||||
this.#state = {
|
||||
client,
|
||||
connectPromise
|
||||
};
|
||||
return connectPromise;
|
||||
}
|
||||
#getPubSubClient() {
|
||||
if (!this.#state)
|
||||
return this.#initiatePubSubClient();
|
||||
return (this.#state.connectPromise ??
|
||||
this.#state.client);
|
||||
}
|
||||
async changeNode(node) {
|
||||
this.#node = node;
|
||||
if (!this.#state)
|
||||
return;
|
||||
// if `connectPromise` is undefined, `this.#subscriptions` is already set
|
||||
// and `this.#state.client` might not have the listeners set yet
|
||||
if (this.#state.connectPromise === undefined) {
|
||||
this.#subscriptions = {
|
||||
[pub_sub_1.PUBSUB_TYPE.CHANNELS]: this.#state.client.getPubSubListeners(pub_sub_1.PUBSUB_TYPE.CHANNELS),
|
||||
[pub_sub_1.PUBSUB_TYPE.PATTERNS]: this.#state.client.getPubSubListeners(pub_sub_1.PUBSUB_TYPE.PATTERNS)
|
||||
};
|
||||
this.#state.client.destroy();
|
||||
}
|
||||
await this.#initiatePubSubClient(true);
|
||||
}
|
||||
#executeCommand(fn) {
|
||||
const client = this.#getPubSubClient();
|
||||
if (client instanceof client_1.default) {
|
||||
return fn(client);
|
||||
}
|
||||
return client.then(client => {
|
||||
// if pubsub was deactivated while connecting
|
||||
if (client === undefined)
|
||||
return;
|
||||
return fn(client);
|
||||
}).catch(err => {
|
||||
if (this.#state?.client.isPubSubActive) {
|
||||
this.#state.client.destroy();
|
||||
this.#state = undefined;
|
||||
}
|
||||
throw err;
|
||||
});
|
||||
}
|
||||
subscribe(channels, listener, bufferMode) {
|
||||
return this.#executeCommand(client => client.SUBSCRIBE(channels, listener, bufferMode));
|
||||
}
|
||||
#unsubscribe(fn) {
|
||||
return this.#executeCommand(async (client) => {
|
||||
const reply = await fn(client);
|
||||
if (!client.isPubSubActive) {
|
||||
client.destroy();
|
||||
this.#state = undefined;
|
||||
}
|
||||
return reply;
|
||||
});
|
||||
}
|
||||
async unsubscribe(channels, listener, bufferMode) {
|
||||
return this.#unsubscribe(client => client.UNSUBSCRIBE(channels, listener, bufferMode));
|
||||
}
|
||||
async pSubscribe(patterns, listener, bufferMode) {
|
||||
return this.#executeCommand(client => client.PSUBSCRIBE(patterns, listener, bufferMode));
|
||||
}
|
||||
async pUnsubscribe(patterns, listener, bufferMode) {
|
||||
return this.#unsubscribe(client => client.PUNSUBSCRIBE(patterns, listener, bufferMode));
|
||||
}
|
||||
destroy() {
|
||||
this.#subscriptions = undefined;
|
||||
if (this.#state === undefined)
|
||||
return;
|
||||
// `connectPromise` already handles the case of `this.#pubSubState = undefined`
|
||||
if (!this.#state.connectPromise) {
|
||||
this.#state.client.destroy();
|
||||
}
|
||||
this.#state = undefined;
|
||||
}
|
||||
}
|
||||
exports.PubSubProxy = PubSubProxy;
|
||||
//# sourceMappingURL=pub-sub-proxy.js.map
|
||||
1
node_modules/@redis/client/dist/lib/sentinel/pub-sub-proxy.js.map
generated
vendored
Normal file
1
node_modules/@redis/client/dist/lib/sentinel/pub-sub-proxy.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"pub-sub-proxy.js","sourceRoot":"","sources":["../../../lib/sentinel/pub-sub-proxy.ts"],"names":[],"mappings":";;;;;;AAAA,8DAAuC;AAGvC,+CAAqF;AAErF,uDAAoC;AAsBpC,MAAa,WAAY,SAAQ,qBAAY;IAC3C,cAAc,CAAC;IACf,QAAQ,CAAC;IAET,KAAK,CAAa;IAClB,MAAM,CAAe;IACrB,cAAc,CAAiB;IAE/B,YAAY,aAAiC,EAAE,OAAgB;QAC7D,KAAK,EAAE,CAAC;QAER,IAAI,CAAC,cAAc,GAAG,aAAa,CAAC;QACpC,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;IAC1B,CAAC;IAED,aAAa;QACX,IAAI,IAAI,CAAC,KAAK,KAAK,SAAS,EAAE,CAAC;YAC7B,MAAM,IAAI,KAAK,CAAC,sDAAsD,CAAC,CAAC;QAC1E,CAAC;QAED,OAAO,IAAI,gBAAW,CAAC;YACrB,GAAG,IAAI,CAAC,cAAc;YACtB,MAAM,EAAE;gBACN,GAAG,IAAI,CAAC,cAAc,CAAC,MAAM;gBAC7B,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI;gBACrB,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI;aACtB;SACF,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,qBAAqB,CAAC,iBAAiB,GAAG,KAAK;QACnD,MAAM,MAAM,GAAG,IAAI,CAAC,aAAa,EAAE;aAChC,EAAE,CAAC,OAAO,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;QAE9B,MAAM,cAAc,GAAG,MAAM,CAAC,OAAO,EAAE;aACpC,IAAI,CAAC,KAAK,EAAC,MAAM,EAAC,EAAE;YACnB,IAAI,IAAI,CAAC,MAA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AO;QACL,IAAI,CAAC,cAAc,GAAG,SAAS,CAAC;QAChC,IAAI,IAAI,CAAC,MAAM,KAAK,SAAS;YAAE,OAAO;QAEtC,+EAA+E;QAC/E,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,cAAc,EAAE,CAAC;YAChC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;QAC/B,CAAC;QAED,IAAI,CAAC,MAAM,GAAG,SAAS,CAAC;IAC1B,CAAC;CACF;AArLD,kCAqLC"}
|
||||
149
node_modules/@redis/client/dist/lib/sentinel/types.d.ts
generated
vendored
Normal file
149
node_modules/@redis/client/dist/lib/sentinel/types.d.ts
generated
vendored
Normal file
@@ -0,0 +1,149 @@
|
||||
import { RedisClientOptions } from '../client';
|
||||
import { CommandOptions } from '../client/commands-queue';
|
||||
import { CommandSignature, CommanderConfig, RedisFunctions, RedisModules, RedisScripts, RespVersions, TypeMapping } from '../RESP/types';
|
||||
import COMMANDS from '../commands';
|
||||
import RedisSentinel, { RedisSentinelClient } from '.';
|
||||
import { RedisTcpSocketOptions } from '../client/socket';
|
||||
import { ClientSideCacheConfig, PooledClientSideCacheProvider } from '../client/cache';
|
||||
export interface RedisNode {
|
||||
host: string;
|
||||
port: number;
|
||||
}
|
||||
export interface RedisSentinelOptions<M extends RedisModules = RedisModules, F extends RedisFunctions = RedisFunctions, S extends RedisScripts = RedisScripts, RESP extends RespVersions = RespVersions, TYPE_MAPPING extends TypeMapping = TypeMapping> extends SentinelCommander<M, F, S, RESP, TYPE_MAPPING> {
|
||||
/**
|
||||
* The sentinel identifier for a particular database cluster
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
* An array of root nodes that are part of the sentinel cluster, which will be used to get the topology. Each element in the array is a client configuration object. There is no need to specify every node in the cluster: 3 should be enough to reliably connect and obtain the sentinel configuration from the server
|
||||
*/
|
||||
sentinelRootNodes: Array<RedisNode>;
|
||||
/**
|
||||
* The maximum number of times a command will retry due to topology changes.
|
||||
*/
|
||||
maxCommandRediscovers?: number;
|
||||
/**
|
||||
* The configuration values for every node in the cluster. Use this for example when specifying an ACL user to connect with
|
||||
*/
|
||||
nodeClientOptions?: RedisClientOptions<RedisModules, RedisFunctions, RedisScripts, RESP, TYPE_MAPPING, RedisTcpSocketOptions>;
|
||||
/**
|
||||
* The configuration values for every sentinel in the cluster. Use this for example when specifying an ACL user to connect with
|
||||
*/
|
||||
sentinelClientOptions?: RedisClientOptions<RedisModules, RedisFunctions, RedisScripts, RESP, TYPE_MAPPING, RedisTcpSocketOptions>;
|
||||
/**
|
||||
* The number of clients connected to the master node
|
||||
*/
|
||||
masterPoolSize?: number;
|
||||
/**
|
||||
* The number of clients connected to each replica node.
|
||||
* When greater than 0, the client will distribute the load by executing read-only commands (such as `GET`, `GEOSEARCH`, etc.) across all the cluster nodes.
|
||||
*/
|
||||
replicaPoolSize?: number;
|
||||
/**
|
||||
* Interval in milliseconds to periodically scan for changes in the sentinel topology.
|
||||
* The client will query the sentinel for changes at this interval.
|
||||
*
|
||||
* Default: 10000 (10 seconds)
|
||||
*/
|
||||
scanInterval?: number;
|
||||
/**
|
||||
* When `true`, error events from client instances inside the sentinel will be propagated to the sentinel instance.
|
||||
* This allows handling all client errors through a single error handler on the sentinel instance.
|
||||
*
|
||||
* Default: false
|
||||
*/
|
||||
passthroughClientErrorEvents?: boolean;
|
||||
/**
|
||||
* When `true`, one client will be reserved for the sentinel object.
|
||||
* When `false`, the sentinel object will wait for the first available client from the pool.
|
||||
*/
|
||||
reserveClient?: boolean;
|
||||
/**
|
||||
* Client Side Caching configuration for the pool.
|
||||
*
|
||||
* Enables Redis Servers and Clients to work together to cache results from commands
|
||||
* sent to a server. The server will notify the client when cached results are no longer valid.
|
||||
* In pooled mode, the cache is shared across all clients in the pool.
|
||||
*
|
||||
* Note: Client Side Caching is only supported with RESP3.
|
||||
*
|
||||
* @example Anonymous cache configuration
|
||||
* ```
|
||||
* const client = createSentinel({
|
||||
* clientSideCache: {
|
||||
* ttl: 0,
|
||||
* maxEntries: 0,
|
||||
* evictPolicy: "LRU"
|
||||
* },
|
||||
* minimum: 5
|
||||
* });
|
||||
* ```
|
||||
*
|
||||
* @example Using a controllable cache
|
||||
* ```
|
||||
* const cache = new BasicPooledClientSideCache({
|
||||
* ttl: 0,
|
||||
* maxEntries: 0,
|
||||
* evictPolicy: "LRU"
|
||||
* });
|
||||
* const client = createSentinel({
|
||||
* clientSideCache: cache,
|
||||
* minimum: 5
|
||||
* });
|
||||
* ```
|
||||
*/
|
||||
clientSideCache?: PooledClientSideCacheProvider | ClientSideCacheConfig;
|
||||
}
|
||||
export interface SentinelCommander<M extends RedisModules, F extends RedisFunctions, S extends RedisScripts, RESP extends RespVersions, TYPE_MAPPING extends TypeMapping> extends CommanderConfig<M, F, S, RESP> {
|
||||
commandOptions?: CommandOptions<TYPE_MAPPING>;
|
||||
}
|
||||
export type RedisSentinelClientOptions = Omit<RedisClientOptions, keyof SentinelCommander<RedisModules, RedisFunctions, RedisScripts, RespVersions, TypeMapping>>;
|
||||
type WithCommands<RESP extends RespVersions, TYPE_MAPPING extends TypeMapping> = {
|
||||
[P in keyof typeof COMMANDS]: CommandSignature<(typeof COMMANDS)[P], RESP, TYPE_MAPPING>;
|
||||
};
|
||||
type WithModules<M extends RedisModules, RESP extends RespVersions, TYPE_MAPPING extends TypeMapping> = {
|
||||
[P in keyof M]: {
|
||||
[C in keyof M[P]]: CommandSignature<M[P][C], RESP, TYPE_MAPPING>;
|
||||
};
|
||||
};
|
||||
type WithFunctions<F extends RedisFunctions, RESP extends RespVersions, TYPE_MAPPING extends TypeMapping> = {
|
||||
[L in keyof F]: {
|
||||
[C in keyof F[L]]: CommandSignature<F[L][C], RESP, TYPE_MAPPING>;
|
||||
};
|
||||
};
|
||||
type WithScripts<S extends RedisScripts, RESP extends RespVersions, TYPE_MAPPING extends TypeMapping> = {
|
||||
[P in keyof S]: CommandSignature<S[P], RESP, TYPE_MAPPING>;
|
||||
};
|
||||
export type RedisSentinelClientType<M extends RedisModules = {}, F extends RedisFunctions = {}, S extends RedisScripts = {}, RESP extends RespVersions = 2, TYPE_MAPPING extends TypeMapping = {}> = (RedisSentinelClient<M, F, S, RESP, TYPE_MAPPING> & WithCommands<RESP, TYPE_MAPPING> & WithModules<M, RESP, TYPE_MAPPING> & WithFunctions<F, RESP, TYPE_MAPPING> & WithScripts<S, RESP, TYPE_MAPPING>);
|
||||
export type RedisSentinelType<M extends RedisModules = {}, F extends RedisFunctions = {}, S extends RedisScripts = {}, RESP extends RespVersions = 2, TYPE_MAPPING extends TypeMapping = {}> = (RedisSentinel<M, F, S, RESP, TYPE_MAPPING> & WithCommands<RESP, TYPE_MAPPING> & WithModules<M, RESP, TYPE_MAPPING> & WithFunctions<F, RESP, TYPE_MAPPING> & WithScripts<S, RESP, TYPE_MAPPING>);
|
||||
export interface SentinelCommandOptions<TYPE_MAPPING extends TypeMapping = TypeMapping> extends CommandOptions<TYPE_MAPPING> {
|
||||
}
|
||||
export type ProxySentinel = RedisSentinel<any, any, any, any, any>;
|
||||
export type ProxySentinelClient = RedisSentinelClient<any, any, any, any, any>;
|
||||
export type NamespaceProxySentinel = {
|
||||
_self: ProxySentinel;
|
||||
};
|
||||
export type NamespaceProxySentinelClient = {
|
||||
_self: ProxySentinelClient;
|
||||
};
|
||||
export type NodeInfo = {
|
||||
ip: any;
|
||||
port: any;
|
||||
flags: any;
|
||||
};
|
||||
export type RedisSentinelEvent = NodeChangeEvent | SizeChangeEvent;
|
||||
export type NodeChangeEvent = {
|
||||
type: "SENTINEL_CHANGE" | "MASTER_CHANGE" | "REPLICA_ADD" | "REPLICA_REMOVE";
|
||||
node: RedisNode;
|
||||
};
|
||||
export type SizeChangeEvent = {
|
||||
type: "SENTINE_LIST_CHANGE";
|
||||
size: Number;
|
||||
};
|
||||
export type ClientErrorEvent = {
|
||||
type: 'MASTER' | 'REPLICA' | 'SENTINEL' | 'PUBSUBPROXY';
|
||||
node: RedisNode;
|
||||
error: Error;
|
||||
};
|
||||
export {};
|
||||
//# sourceMappingURL=types.d.ts.map
|
||||
1
node_modules/@redis/client/dist/lib/sentinel/types.d.ts.map
generated
vendored
Normal file
1
node_modules/@redis/client/dist/lib/sentinel/types.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../lib/sentinel/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,cAAc,EAAE,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACzI,OAAO,QAAQ,MAAM,aAAa,CAAC;AACnC,OAAO,aAAa,EAAE,EAAE,mBAAmB,EAAE,MAAM,GAAG,CAAC;AACvD,OAAO,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,EAAE,qBAAqB,EAAE,6BAA6B,EAAE,MAAM,iBAAiB,CAAC;AAEvF,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,oBAAoB,CACnC,CAAC,SAAS,YAAY,GAAG,YAAY,EACrC,CAAC,SAAS,cAAc,GAAG,cAAc,EACzC,CAAC,SAAS,YAAY,GAAG,YAAY,EACrC,IAAI,SAAS,YAAY,GAAG,YAAY,EACxC,YAAY,SAAS,WAAW,GAAG,WAAW,CAC9C,SAAQ,iBAAiB,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,IAAI,EAAE,YAAY,CAAC;IACtD;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,iBAAiB,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;IACpC;;OAEG;IACH,qBAAqB,CAAC,EAAE,MAAM,CAAC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,CAAC;CACZ,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG,eAAe,GAAG,eAAe,CAAC;AAEnE,MAAM,MAAM,eAAe,GAAG;IAC5B,IAAI,EAAE,iBAAiB,GAAG,eAAe,GAAG,aAAa,GAAG,gBAAgB,CAAC;IAC7E,IAAI,EAAE,SAAS,CAAC;CACjB,CAAA;AAED,MAAM,MAAM,eAAe,GAAG;IAC5B,IAAI,EAAE,qBAAqB,CAAC;IAC5B,IAAI,EAAE,MAAM,CAAC;CACd,CAAA;AAED,MAAM,MAAM,gBAAgB,GAAG;IAC7B,IAAI,EAAE,QAAQ,GAAG,SAAS,GAAG,UAAU,GAAG,aAAa,CAAC;IACxD,IAAI,EAAE,SAAS,CAAC;IAChB,KAAK,EAAE,KAAK,CAAC;CACd,CAAA"}
|
||||
3
node_modules/@redis/client/dist/lib/sentinel/types.js
generated
vendored
Normal file
3
node_modules/@redis/client/dist/lib/sentinel/types.js
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
//# sourceMappingURL=types.js.map
|
||||
1
node_modules/@redis/client/dist/lib/sentinel/types.js.map
generated
vendored
Normal file
1
node_modules/@redis/client/dist/lib/sentinel/types.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../lib/sentinel/types.ts"],"names":[],"mappings":""}
|
||||
11
node_modules/@redis/client/dist/lib/sentinel/utils.d.ts
generated
vendored
Normal file
11
node_modules/@redis/client/dist/lib/sentinel/utils.d.ts
generated
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
import { ArrayReply, Command, RedisFunction, RedisScript, RespVersions, UnwrapReply } from '../RESP/types';
|
||||
import { RedisSocketOptions } from '../client/socket';
|
||||
import { NamespaceProxySentinel, NamespaceProxySentinelClient, ProxySentinel, ProxySentinelClient, RedisNode } from './types';
|
||||
export declare function parseNode(node: Record<string, string>): RedisNode | undefined;
|
||||
export declare function createNodeList(nodes: UnwrapReply<ArrayReply<Record<string, string>>>): RedisNode[];
|
||||
export declare function clientSocketToNode(socket: RedisSocketOptions): RedisNode;
|
||||
export declare function createCommand<T extends ProxySentinel | ProxySentinelClient>(command: Command, resp: RespVersions): (this: T, ...args: Array<unknown>) => Promise<any>;
|
||||
export declare function createFunctionCommand<T extends NamespaceProxySentinel | NamespaceProxySentinelClient>(name: string, fn: RedisFunction, resp: RespVersions): (this: T, ...args: Array<unknown>) => Promise<any>;
|
||||
export declare function createModuleCommand<T extends NamespaceProxySentinel | NamespaceProxySentinelClient>(command: Command, resp: RespVersions): (this: T, ...args: Array<unknown>) => Promise<any>;
|
||||
export declare function createScriptCommand<T extends ProxySentinel | ProxySentinelClient>(script: RedisScript, resp: RespVersions): (this: T, ...args: Array<unknown>) => Promise<any>;
|
||||
//# sourceMappingURL=utils.d.ts.map
|
||||
1
node_modules/@redis/client/dist/lib/sentinel/utils.d.ts.map
generated
vendored
Normal file
1
node_modules/@redis/client/dist/lib/sentinel/utils.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../lib/sentinel/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE3G,OAAO,EAAE,kBAAkB,EAAyB,MAAM,kBAAkB,CAAC;AAE7E,OAAO,EAAE,sBAAsB,EAAE,4BAA4B,EAAE,aAAa,EAAE,mBAAmB,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAG9H,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,GAAG,SAAS,CAO7E;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,WAAW,CAAC,UAAU,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,eAYpF;AAED,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,kBAAkB,GAAG,SAAS,CAOxE;AAED,wBAAgB,aAAa,CAAC,CAAC,SAAS,aAAa,GAAG,mBAAmB,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,YAAY,UAGlF,CAAC,WAAW,MAAM,OAAO,CAAC,kBASxD;AAED,wBAAgB,qBAAqB,CAAC,CAAC,SAAS,sBAAsB,GAAG,4BAA4B,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,YAAY,UAI3H,CAAC,WAAW,MAAM,OAAO,CAAC,kBAUxD;AAED,wBAAgB,mBAAmB,CAAC,CAAC,SAAS,sBAAsB,GAAG,4BAA4B,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,YAAY,UAG1G,CAAC,WAAW,MAAM,OAAO,CAAC,kBASxD;AAED,wBAAgB,mBAAmB,CAAC,CAAC,SAAS,aAAa,GAAG,mBAAmB,EAAE,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,YAAY,UAI3F,CAAC,WAAW,MAAM,OAAO,CAAC,kBAUxD"}
|
||||
76
node_modules/@redis/client/dist/lib/sentinel/utils.js
generated
vendored
Normal file
76
node_modules/@redis/client/dist/lib/sentinel/utils.js
generated
vendored
Normal file
@@ -0,0 +1,76 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.createScriptCommand = exports.createModuleCommand = exports.createFunctionCommand = exports.createCommand = exports.clientSocketToNode = exports.createNodeList = exports.parseNode = void 0;
|
||||
const parser_1 = require("../client/parser");
|
||||
const commander_1 = require("../commander");
|
||||
/* TODO: should use map interface, would need a transform reply probably? as resp2 is list form, which this depends on */
|
||||
function parseNode(node) {
|
||||
if (node.flags.includes("s_down") || node.flags.includes("disconnected") || node.flags.includes("failover_in_progress")) {
|
||||
return undefined;
|
||||
}
|
||||
return { host: node.ip, port: Number(node.port) };
|
||||
}
|
||||
exports.parseNode = parseNode;
|
||||
function createNodeList(nodes) {
|
||||
var nodeList = [];
|
||||
for (const nodeData of nodes) {
|
||||
const node = parseNode(nodeData);
|
||||
if (node === undefined) {
|
||||
continue;
|
||||
}
|
||||
nodeList.push(node);
|
||||
}
|
||||
return nodeList;
|
||||
}
|
||||
exports.createNodeList = createNodeList;
|
||||
function clientSocketToNode(socket) {
|
||||
const s = socket;
|
||||
return {
|
||||
host: s.host,
|
||||
port: s.port
|
||||
};
|
||||
}
|
||||
exports.clientSocketToNode = clientSocketToNode;
|
||||
function createCommand(command, resp) {
|
||||
const transformReply = (0, commander_1.getTransformReply)(command, resp);
|
||||
return async function (...args) {
|
||||
const parser = new parser_1.BasicCommandParser();
|
||||
command.parseCommand(parser, ...args);
|
||||
return this._self._execute(command.IS_READ_ONLY, client => client._executeCommand(command, parser, this.commandOptions, transformReply));
|
||||
};
|
||||
}
|
||||
exports.createCommand = createCommand;
|
||||
function createFunctionCommand(name, fn, resp) {
|
||||
const prefix = (0, commander_1.functionArgumentsPrefix)(name, fn);
|
||||
const transformReply = (0, commander_1.getTransformReply)(fn, resp);
|
||||
return async function (...args) {
|
||||
const parser = new parser_1.BasicCommandParser();
|
||||
parser.push(...prefix);
|
||||
fn.parseCommand(parser, ...args);
|
||||
return this._self._execute(fn.IS_READ_ONLY, client => client._executeCommand(fn, parser, this._self.commandOptions, transformReply));
|
||||
};
|
||||
}
|
||||
exports.createFunctionCommand = createFunctionCommand;
|
||||
;
|
||||
function createModuleCommand(command, resp) {
|
||||
const transformReply = (0, commander_1.getTransformReply)(command, resp);
|
||||
return async function (...args) {
|
||||
const parser = new parser_1.BasicCommandParser();
|
||||
command.parseCommand(parser, ...args);
|
||||
return this._self._execute(command.IS_READ_ONLY, client => client._executeCommand(command, parser, this._self.commandOptions, transformReply));
|
||||
};
|
||||
}
|
||||
exports.createModuleCommand = createModuleCommand;
|
||||
;
|
||||
function createScriptCommand(script, resp) {
|
||||
const prefix = (0, commander_1.scriptArgumentsPrefix)(script);
|
||||
const transformReply = (0, commander_1.getTransformReply)(script, resp);
|
||||
return async function (...args) {
|
||||
const parser = new parser_1.BasicCommandParser();
|
||||
parser.push(...prefix);
|
||||
script.parseCommand(parser, ...args);
|
||||
return this._self._execute(script.IS_READ_ONLY, client => client._executeScript(script, parser, this.commandOptions, transformReply));
|
||||
};
|
||||
}
|
||||
exports.createScriptCommand = createScriptCommand;
|
||||
//# sourceMappingURL=utils.js.map
|
||||
1
node_modules/@redis/client/dist/lib/sentinel/utils.js.map
generated
vendored
Normal file
1
node_modules/@redis/client/dist/lib/sentinel/utils.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../lib/sentinel/utils.ts"],"names":[],"mappings":";;;AACA,6CAAsD;AAEtD,4CAAiG;AAGjG,yHAAyH;AACzH,SAAgB,SAAS,CAAC,IAA4B;IAEpD,IAAI,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,cAAc,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,sBAAsB,CAAC,EAAE,CAAC;QACxH,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,EAAE,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;AACpD,CAAC;AAPD,8BAOC;AAED,SAAgB,cAAc,CAAC,KAAsD;IACnF,IAAI,QAAQ,GAAqB,EAAE,CAAC;IAEpC,KAAK,MAAM,QAAQ,IAAI,KAAK,EAAE,CAAC;QAC7B,MAAM,IAAI,GAAG,SAAS,CAAC,QAAQ,CAAC,CAAA;QAChC,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;YACvB,SAAS;QACX,CAAC;QACD,QAAQ,CAAC,IAAI,CAAC,IAAI,CAA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ACnB,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,CAAC,cAAc,EAAE,cAAc,CAAC,CACrF,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC;AAdD,kDAcC"}
|
||||
7
node_modules/@redis/client/dist/lib/sentinel/wait-queue.d.ts
generated
vendored
Normal file
7
node_modules/@redis/client/dist/lib/sentinel/wait-queue.d.ts
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
export declare class WaitQueue<T> {
|
||||
#private;
|
||||
push(value: T): void;
|
||||
shift(): T | undefined;
|
||||
wait(): Promise<T>;
|
||||
}
|
||||
//# sourceMappingURL=wait-queue.d.ts.map
|
||||
1
node_modules/@redis/client/dist/lib/sentinel/wait-queue.d.ts.map
generated
vendored
Normal file
1
node_modules/@redis/client/dist/lib/sentinel/wait-queue.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"wait-queue.d.ts","sourceRoot":"","sources":["../../../lib/sentinel/wait-queue.ts"],"names":[],"mappings":"AAEA,qBAAa,SAAS,CAAC,CAAC;;IAItB,IAAI,CAAC,KAAK,EAAE,CAAC;IAUb,KAAK;IAIL,IAAI;CAGL"}
|
||||
24
node_modules/@redis/client/dist/lib/sentinel/wait-queue.js
generated
vendored
Normal file
24
node_modules/@redis/client/dist/lib/sentinel/wait-queue.js
generated
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.WaitQueue = void 0;
|
||||
const linked_list_1 = require("../client/linked-list");
|
||||
class WaitQueue {
|
||||
#list = new linked_list_1.SinglyLinkedList();
|
||||
#queue = new linked_list_1.SinglyLinkedList();
|
||||
push(value) {
|
||||
const resolve = this.#queue.shift();
|
||||
if (resolve !== undefined) {
|
||||
resolve(value);
|
||||
return;
|
||||
}
|
||||
this.#list.push(value);
|
||||
}
|
||||
shift() {
|
||||
return this.#list.shift();
|
||||
}
|
||||
wait() {
|
||||
return new Promise(resolve => this.#queue.push(resolve));
|
||||
}
|
||||
}
|
||||
exports.WaitQueue = WaitQueue;
|
||||
//# sourceMappingURL=wait-queue.js.map
|
||||
1
node_modules/@redis/client/dist/lib/sentinel/wait-queue.js.map
generated
vendored
Normal file
1
node_modules/@redis/client/dist/lib/sentinel/wait-queue.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"wait-queue.js","sourceRoot":"","sources":["../../../lib/sentinel/wait-queue.ts"],"names":[],"mappings":";;;AAAA,uDAAyD;AAEzD,MAAa,SAAS;IACpB,KAAK,GAAG,IAAI,8BAAgB,EAAK,CAAC;IAClC,MAAM,GAAG,IAAI,8BAAgB,EAAwB,CAAC;IAEtD,IAAI,CAAC,KAAQ;QACX,MAAM,OAAO,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;QACpC,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;YAC1B,OAAO,CAAC,KAAK,CAAC,CAAC;YACf,OAAO;QACT,CAAC;QAED,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACzB,CAAC;IAED,KAAK;QACH,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;IAC5B,CAAC;IAED,IAAI;QACF,OAAO,IAAI,OAAO,CAAI,OAAO,CAAC,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;IAC9D,CAAC;CACF;AArBD,8BAqBC"}
|
||||
Reference in New Issue
Block a user