123
This commit is contained in:
26
node_modules/@redis/client/dist/lib/commands/CLUSTER_SLOTS.js
generated
vendored
Normal file
26
node_modules/@redis/client/dist/lib/commands/CLUSTER_SLOTS.js
generated
vendored
Normal file
@ -0,0 +1,26 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.transformReply = exports.transformArguments = void 0;
|
||||
function transformArguments() {
|
||||
return ['CLUSTER', 'SLOTS'];
|
||||
}
|
||||
exports.transformArguments = transformArguments;
|
||||
;
|
||||
function transformReply(reply) {
|
||||
return reply.map(([from, to, master, ...replicas]) => {
|
||||
return {
|
||||
from,
|
||||
to,
|
||||
master: transformNode(master),
|
||||
replicas: replicas.map(transformNode)
|
||||
};
|
||||
});
|
||||
}
|
||||
exports.transformReply = transformReply;
|
||||
function transformNode([ip, port, id]) {
|
||||
return {
|
||||
ip,
|
||||
port,
|
||||
id
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user