CLUSTER_SETSLOT.js 695 B

123456789101112131415161718
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. exports.transformArguments = exports.ClusterSlotStates = void 0;
  4. var ClusterSlotStates;
  5. (function (ClusterSlotStates) {
  6. ClusterSlotStates["IMPORTING"] = "IMPORTING";
  7. ClusterSlotStates["MIGRATING"] = "MIGRATING";
  8. ClusterSlotStates["STABLE"] = "STABLE";
  9. ClusterSlotStates["NODE"] = "NODE";
  10. })(ClusterSlotStates || (exports.ClusterSlotStates = ClusterSlotStates = {}));
  11. function transformArguments(slot, state, nodeId) {
  12. const args = ['CLUSTER', 'SETSLOT', slot.toString(), state];
  13. if (nodeId) {
  14. args.push(nodeId);
  15. }
  16. return args;
  17. }
  18. exports.transformArguments = transformArguments;