Skip to content

Commit 317919f

Browse files
authored
add docs for CLIENT SETINFO (#2362)
also update commands.json with XINFO history
1 parent 804b59a commit 317919f

File tree

2 files changed

+62
-0
lines changed

2 files changed

+62
-0
lines changed

commands.json

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2135,6 +2135,42 @@
21352135
"stale"
21362136
]
21372137
},
2138+
"CLIENT SETINFO": {
2139+
"summary": "Set client or connection specific info",
2140+
"since": "7.2.0",
2141+
"group": "connection",
2142+
"complexity": "O(1)",
2143+
"acl_categories": [
2144+
"@slow",
2145+
"@connection"
2146+
],
2147+
"arity": 4,
2148+
"arguments": [
2149+
{
2150+
"name": "attr",
2151+
"type": "oneof",
2152+
"arguments": [
2153+
{
2154+
"name": "libname",
2155+
"type": "string",
2156+
"display_text": "libname",
2157+
"token": "LIB-NAME"
2158+
},
2159+
{
2160+
"name": "libver",
2161+
"type": "string",
2162+
"display_text": "libver",
2163+
"token": "LIB-VER"
2164+
}
2165+
]
2166+
}
2167+
],
2168+
"command_flags": [
2169+
"noscript",
2170+
"loading",
2171+
"stale"
2172+
]
2173+
},
21382174
"CLIENT SETNAME": {
21392175
"summary": "Set the current connection name",
21402176
"since": "2.6.9",
@@ -15076,6 +15112,12 @@
1507615112
"since": "5.0.0",
1507715113
"group": "stream",
1507815114
"complexity": "O(1)",
15115+
"history": [
15116+
[
15117+
"7.2.0",
15118+
"Added the `inactive` field."
15119+
]
15120+
],
1507915121
"acl_categories": [
1508015122
"@read",
1508115123
"@stream",
@@ -15199,6 +15241,10 @@
1519915241
[
1520015242
"7.0.0",
1520115243
"Added the `max-deleted-entry-id`, `entries-added`, `recorded-first-entry-id`, `entries-read` and `lag` fields"
15244+
],
15245+
[
15246+
"7.2.0",
15247+
"Added the `active-time` field, and changed the meaning of `seen-time`."
1520215248
]
1520315249
],
1520415250
"acl_categories": [

commands/client-setinfo.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
The `CLIENT SETINFO` command assigns various info attributes to the current connection which are displayed in the output of `CLIENT LIST` and `CLIENT INFO`.
2+
3+
Client libraries are expected to pipeline this command after authentication on all connections
4+
and ignore failures since they could be connected to an older version that doesn't support them.
5+
6+
Currently the supported attributes are:
7+
* `lib-name` - meant to hold the name of the client library that's in use.
8+
* `lib-ver` - meant to hold the client library's version.
9+
10+
There is no limit to the length of these attributes. However it is not possible to use spaces, newlines, or other non-printable characters that would violate the format of the `CLIENT LIST` reply.
11+
12+
Note that these attributes are **not** cleared by the RESET command.
13+
14+
@return
15+
16+
@simple-string-reply: `OK` if the attribute name was successfully set.

0 commit comments

Comments
 (0)