Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add docs for CLIENT SETINFO #2362

Merged
merged 6 commits into from
Mar 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions commands.json
Original file line number Diff line number Diff line change
Expand Up @@ -2135,6 +2135,42 @@
"stale"
]
},
"CLIENT SETINFO": {
"summary": "Set client or connection specific info",
"since": "7.2.0",
"group": "connection",
"complexity": "O(1)",
"acl_categories": [
"@slow",
"@connection"
],
"arity": 4,
"arguments": [
{
"name": "attr",
"type": "oneof",
"arguments": [
{
"name": "libname",
"type": "string",
"display_text": "libname",
"token": "LIB-NAME"
},
{
"name": "libver",
"type": "string",
"display_text": "libver",
"token": "LIB-VER"
}
]
}
],
"command_flags": [
"noscript",
"loading",
"stale"
]
},
"CLIENT SETNAME": {
"summary": "Set the current connection name",
"since": "2.6.9",
Expand Down Expand Up @@ -15076,6 +15112,12 @@
"since": "5.0.0",
"group": "stream",
"complexity": "O(1)",
"history": [
[
"7.2.0",
"Added the `inactive` field."
]
],
"acl_categories": [
"@read",
"@stream",
Expand Down Expand Up @@ -15199,6 +15241,10 @@
[
"7.0.0",
"Added the `max-deleted-entry-id`, `entries-added`, `recorded-first-entry-id`, `entries-read` and `lag` fields"
],
[
"7.2.0",
"Added the `active-time` field, and changed the meaning of `seen-time`."
]
],
"acl_categories": [
Expand Down
16 changes: 16 additions & 0 deletions commands/client-setinfo.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
The `CLIENT SETINFO` command assigns various info attributes to the current connection which are displayed in the output of `CLIENT LIST` and `CLIENT INFO`.

Client libraries are expected to pipeline this command after authentication on all connections
and ignore failures since they could be connected to an older version that doesn't support them.

Currently the supported attributes are:
* `lib-name` - meant to hold the name of the client library that's in use.
* `lib-ver` - meant to hold the client library's version.

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.

Note that these attributes are **not** cleared by the RESET command.

@return

@simple-string-reply: `OK` if the attribute name was successfully set.