CLIENT
Manages client connection properties.
Syntax
Section titled “Syntax”CLIENT <subcommand> [arguments]Subcommands
Section titled “Subcommands”CLIENT SETINFO
Section titled “CLIENT SETINFO”Sets client library metadata on the current connection.
CLIENT SETINFO <attribute> <value>| Parameter | Type | Required | Description |
|---|---|---|---|
attribute | string | Yes | Attribute name: lib-name or lib-ver |
value | string | Yes | Attribute value |
CLIENT SETNAME
Section titled “CLIENT SETNAME”Sets a human-readable name for the current connection.
CLIENT SETNAME <name>| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Connection name |
Return Value
Section titled “Return Value”All subcommands return simple string OK on success.
Behavior
Section titled “Behavior”CLIENT SETINFO stores library metadata (lib-name or lib-ver) on the session. CLIENT SETNAME sets the connection
name on the session.
This command does not require the cluster to be initialized.
Errors
Section titled “Errors”ERR is returned when:
- Wrong number of arguments for the subcommand.
- Unrecognized attribute for
SETINFO(notlib-nameorlib-ver). - Unknown subcommand.
Examples
Section titled “Examples”Set library name:
127.0.0.1:5484> CLIENT SETINFO lib-name jedisOKSet library version:
127.0.0.1:5484> CLIENT SETINFO lib-ver 4.3.1OKSet connection name:
127.0.0.1:5484> CLIENT SETNAME my-app-connectionOK