diff options
Diffstat (limited to 'examples/redis-unstable/src/commands/cluster-migration.json')
| -rw-r--r-- | examples/redis-unstable/src/commands/cluster-migration.json | 141 |
1 files changed, 141 insertions, 0 deletions
diff --git a/examples/redis-unstable/src/commands/cluster-migration.json b/examples/redis-unstable/src/commands/cluster-migration.json new file mode 100644 index 0000000..c6835ce --- /dev/null +++ b/examples/redis-unstable/src/commands/cluster-migration.json | |||
| @@ -0,0 +1,141 @@ | |||
| 1 | { | ||
| 2 | "MIGRATION": { | ||
| 3 | "summary": "Start, monitor and cancel slot migration.", | ||
| 4 | "complexity": "O(N) where N is the total number of the slots between the start slot and end slot arguments.", | ||
| 5 | "group": "cluster", | ||
| 6 | "since": "8.4.0", | ||
| 7 | "arity": -4, | ||
| 8 | "container": "CLUSTER", | ||
| 9 | "function": "clusterCommand", | ||
| 10 | "command_flags": [ | ||
| 11 | "NO_ASYNC_LOADING", | ||
| 12 | "ADMIN", | ||
| 13 | "STALE" | ||
| 14 | ], | ||
| 15 | "arguments": [ | ||
| 16 | { | ||
| 17 | "name": "subcommand", | ||
| 18 | "type": "oneof", | ||
| 19 | "arguments": [ | ||
| 20 | { | ||
| 21 | "name": "import", | ||
| 22 | "token": "IMPORT", | ||
| 23 | "type": "block", | ||
| 24 | "multiple": true, | ||
| 25 | "arguments": [ | ||
| 26 | { | ||
| 27 | "name": "start-slot", | ||
| 28 | "type": "integer" | ||
| 29 | }, | ||
| 30 | { | ||
| 31 | "name": "end-slot", | ||
| 32 | "type": "integer" | ||
| 33 | } | ||
| 34 | ] | ||
| 35 | }, | ||
| 36 | { | ||
| 37 | "name": "cancel", | ||
| 38 | "token": "CANCEL", | ||
| 39 | "type": "oneof", | ||
| 40 | "arguments": [ | ||
| 41 | { | ||
| 42 | "token": "ID", | ||
| 43 | "name": "task-id", | ||
| 44 | "type": "string" | ||
| 45 | }, | ||
| 46 | { | ||
| 47 | "name": "all", | ||
| 48 | "token": "ALL", | ||
| 49 | "type": "pure-token" | ||
| 50 | } | ||
| 51 | ] | ||
| 52 | }, | ||
| 53 | { | ||
| 54 | "name": "status", | ||
| 55 | "token": "STATUS", | ||
| 56 | "type": "oneof", | ||
| 57 | "arguments": [ | ||
| 58 | { | ||
| 59 | "token": "ID", | ||
| 60 | "name": "task-id", | ||
| 61 | "type": "string", | ||
| 62 | "optional": true | ||
| 63 | }, | ||
| 64 | { | ||
| 65 | "name": "all", | ||
| 66 | "token": "ALL", | ||
| 67 | "type": "pure-token", | ||
| 68 | "optional": true | ||
| 69 | } | ||
| 70 | ] | ||
| 71 | } | ||
| 72 | ] | ||
| 73 | } | ||
| 74 | ], | ||
| 75 | "reply_schema": { | ||
| 76 | "oneOf": [ | ||
| 77 | { | ||
| 78 | "description": "Reply to CLUSTER MIGRATION IMPORT, returns the task ID.", | ||
| 79 | "type": "string" | ||
| 80 | }, | ||
| 81 | { | ||
| 82 | "description": "Reply to CLUSTER MIGRATION CANCEL, number of cancelled migration operations.", | ||
| 83 | "type": "integer" | ||
| 84 | }, | ||
| 85 | { | ||
| 86 | "description": "Reply to CLUSTER MIGRATION STATUS, array of migration operation details.", | ||
| 87 | "type": "array", | ||
| 88 | "items": { | ||
| 89 | "type": "object", | ||
| 90 | "additionalProperties": false, | ||
| 91 | "properties": { | ||
| 92 | "id": { | ||
| 93 | "type": "string" | ||
| 94 | }, | ||
| 95 | "slots": { | ||
| 96 | "type": "string" | ||
| 97 | }, | ||
| 98 | "source": { | ||
| 99 | "type": "string" | ||
| 100 | }, | ||
| 101 | "dest": { | ||
| 102 | "type": "string" | ||
| 103 | }, | ||
| 104 | "operation": { | ||
| 105 | "oneOf": [ | ||
| 106 | { | ||
| 107 | "const": "import" | ||
| 108 | }, | ||
| 109 | { | ||
| 110 | "const": "migrate" | ||
| 111 | } | ||
| 112 | ] | ||
| 113 | }, | ||
| 114 | "state": { | ||
| 115 | "type": "string" | ||
| 116 | }, | ||
| 117 | "last_error": { | ||
| 118 | "type": "string" | ||
| 119 | }, | ||
| 120 | "retries": { | ||
| 121 | "type": "integer" | ||
| 122 | }, | ||
| 123 | "create_time": { | ||
| 124 | "type": "integer" | ||
| 125 | }, | ||
| 126 | "start_time": { | ||
| 127 | "type": "integer" | ||
| 128 | }, | ||
| 129 | "end_time": { | ||
| 130 | "type": "integer" | ||
| 131 | }, | ||
| 132 | "write_pause_ms": { | ||
| 133 | "type": "integer" | ||
| 134 | } | ||
| 135 | } | ||
| 136 | } | ||
| 137 | } | ||
| 138 | ] | ||
| 139 | } | ||
| 140 | } | ||
| 141 | } | ||
