diff --git a/commands.json b/commands.json index 2863ecce01..20a6eb1781 100644 --- a/commands.json +++ b/commands.json @@ -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", @@ -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", @@ -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": [ diff --git a/commands/client-setinfo.md b/commands/client-setinfo.md new file mode 100644 index 0000000000..b6ff217411 --- /dev/null +++ b/commands/client-setinfo.md @@ -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.