Skip to content

Commit

Permalink
feat: add SCRIPT SHOW, CLIENT CAPA, and CLUSTER SLOT-STATS commands (#…
Browse files Browse the repository at this point in the history
…628)

Signed-off-by: Rueian <[email protected]>
  • Loading branch information
rueian authored Sep 2, 2024
1 parent 31e0c98 commit f119f68
Show file tree
Hide file tree
Showing 9 changed files with 316 additions and 1 deletion.
100 changes: 100 additions & 0 deletions hack/cmds/commands.json
Original file line number Diff line number Diff line change
Expand Up @@ -636,6 +636,17 @@
"since": "6.0.0",
"group": "connection"
},
"CLIENT CAPA": {
"arguments": [
{
"name": "capability",
"type": "string",
"multiple": true
}
],
"since": "8.0.0",
"group": "connection"
},
"CLIENT GETNAME": {
"summary": "Get the current connection name",
"complexity": "O(1)",
Expand Down Expand Up @@ -1242,6 +1253,12 @@
"name": "node-id",
"type": "string",
"optional": true
},
{
"name": "timeout",
"command": "TIMEOUT",
"type": "integer",
"optional": true
}
],
"since": "3.0.0",
Expand All @@ -1268,6 +1285,73 @@
"since": "3.0.0",
"group": "cluster"
},
"CLUSTER SLOT-STATS": {
"arguments": [
{
"name": "filter",
"type": "oneof",
"arguments": [
{
"type": "block",
"arguments": [
{
"token": "SLOTSRANGE",
"type": "pure-token",
"name": "slotsrange"
},
{
"name": "start-slot",
"type": "integer"
},
{
"name": "end-slot",
"type": "integer"
}
]
},
{
"type": "block",
"arguments": [
{
"token": "ORDERBY",
"type": "pure-token",
"name": "orderby"
},
{
"name": "metric",
"type": "string"
},
{
"token": "LIMIT",
"name": "limit",
"type": "integer",
"optional": true
},
{
"name": "order",
"type": "oneof",
"optional": true,
"arguments": [
{
"name": "asc",
"type": "pure-token",
"token": "ASC"
},
{
"name": "desc",
"type": "pure-token",
"token": "DESC"
}
]
}
]
}
]
}
],
"since": "8.0.0",
"group": "cluster"
},
"COMMAND COUNT": {
"summary": "Get total number of Redis commands",
"complexity": "O(1)",
Expand Down Expand Up @@ -4866,6 +4950,16 @@
"since": "2.6.0",
"group": "scripting"
},
"SCRIPT SHOW": {
"arguments": [
{
"name": "sha1",
"type": "string"
}
],
"since": "8.0.0",
"group": "scripting"
},
"SCRIPT FLUSH": {
"summary": "Remove all the scripts from the script cache.",
"arguments": [
Expand Down Expand Up @@ -7228,6 +7322,12 @@
"name": "count",
"type": "integer",
"optional": true
},
{
"token": "NOSCORES",
"name": "noscores",
"type": "pure-token",
"optional": true
}
],
"since": "2.8.0",
Expand Down
131 changes: 131 additions & 0 deletions internal/cmds/gen_cluster.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions internal/cmds/gen_cluster_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 25 additions & 0 deletions internal/cmds/gen_connection.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion internal/cmds/gen_connection_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit f119f68

Please sign in to comment.