summaryrefslogtreecommitdiff
path: root/examples/redis-unstable/src/commands/cluster-migration.json
diff options
context:
space:
mode:
Diffstat (limited to 'examples/redis-unstable/src/commands/cluster-migration.json')
-rw-r--r--examples/redis-unstable/src/commands/cluster-migration.json141
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 @@
+{
+ "MIGRATION": {
+ "summary": "Start, monitor and cancel slot migration.",
+ "complexity": "O(N) where N is the total number of the slots between the start slot and end slot arguments.",
+ "group": "cluster",
+ "since": "8.4.0",
+ "arity": -4,
+ "container": "CLUSTER",
+ "function": "clusterCommand",
+ "command_flags": [
+ "NO_ASYNC_LOADING",
+ "ADMIN",
+ "STALE"
+ ],
+ "arguments": [
+ {
+ "name": "subcommand",
+ "type": "oneof",
+ "arguments": [
+ {
+ "name": "import",
+ "token": "IMPORT",
+ "type": "block",
+ "multiple": true,
+ "arguments": [
+ {
+ "name": "start-slot",
+ "type": "integer"
+ },
+ {
+ "name": "end-slot",
+ "type": "integer"
+ }
+ ]
+ },
+ {
+ "name": "cancel",
+ "token": "CANCEL",
+ "type": "oneof",
+ "arguments": [
+ {
+ "token": "ID",
+ "name": "task-id",
+ "type": "string"
+ },
+ {
+ "name": "all",
+ "token": "ALL",
+ "type": "pure-token"
+ }
+ ]
+ },
+ {
+ "name": "status",
+ "token": "STATUS",
+ "type": "oneof",
+ "arguments": [
+ {
+ "token": "ID",
+ "name": "task-id",
+ "type": "string",
+ "optional": true
+ },
+ {
+ "name": "all",
+ "token": "ALL",
+ "type": "pure-token",
+ "optional": true
+ }
+ ]
+ }
+ ]
+ }
+ ],
+ "reply_schema": {
+ "oneOf": [
+ {
+ "description": "Reply to CLUSTER MIGRATION IMPORT, returns the task ID.",
+ "type": "string"
+ },
+ {
+ "description": "Reply to CLUSTER MIGRATION CANCEL, number of cancelled migration operations.",
+ "type": "integer"
+ },
+ {
+ "description": "Reply to CLUSTER MIGRATION STATUS, array of migration operation details.",
+ "type": "array",
+ "items": {
+ "type": "object",
+ "additionalProperties": false,
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "slots": {
+ "type": "string"
+ },
+ "source": {
+ "type": "string"
+ },
+ "dest": {
+ "type": "string"
+ },
+ "operation": {
+ "oneOf": [
+ {
+ "const": "import"
+ },
+ {
+ "const": "migrate"
+ }
+ ]
+ },
+ "state": {
+ "type": "string"
+ },
+ "last_error": {
+ "type": "string"
+ },
+ "retries": {
+ "type": "integer"
+ },
+ "create_time": {
+ "type": "integer"
+ },
+ "start_time": {
+ "type": "integer"
+ },
+ "end_time": {
+ "type": "integer"
+ },
+ "write_pause_ms": {
+ "type": "integer"
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+}