From bf0818d3447d420fa3e1b789924601b15b27d9fb Mon Sep 17 00:00:00 2001 From: ofekshenawa Date: Mon, 19 Feb 2024 09:52:13 +0200 Subject: [PATCH 1/6] docs: DisableIdentity explanation --- README.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/README.md b/README.md index 7ba242682..2853fbbc4 100644 --- a/README.md +++ b/README.md @@ -161,6 +161,30 @@ func ExampleClient() *redis.Client { ``` + +### Advanced Configuration + +go-redis supports extending the CLIENT SETNAME command to allow for custom client identification. This feature enables community members to append their own suffixes to the client name, facilitating a deeper understanding of Redis usage patterns. + +#### Default Client Identification + +By default, go-redis automatically sets the client library name and version during the connection process. This behavior ensures that the Redis server is aware of the client's identity, which is crucial for monitoring, debugging, and analytics. + +#### Disabling Identity Verification + +For use cases where connection identity verification is not required or needs to be explicitly disabled, go-redis provides the `DisableIdentity` configuration option. This option can be particularly useful in environments where Redis servers do not support `client setinfo`. + +To disable verification, set the `DisableIdentity` option to `true` in the Redis client options: + +```go +rdb := redis.NewClient(&redis.Options{ + Addr: "localhost:6379", + Password: "", + DB: 0, + DisableIdentity: true, // Disable set-info on connect +}) +``` + ## Contributing Please see [out contributing guidelines](CONTRIBUTING.md) to help us improve this library! From 67fe3b37eb9e3265d5ca1c579d8b3696af2aae27 Mon Sep 17 00:00:00 2001 From: ofekshenawa Date: Mon, 19 Feb 2024 10:05:36 +0200 Subject: [PATCH 2/6] Add SETNAME to wordlist --- .github/wordlist.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/wordlist.txt b/.github/wordlist.txt index 48d3fc487..a5f3428d9 100644 --- a/.github/wordlist.txt +++ b/.github/wordlist.txt @@ -43,6 +43,7 @@ RocksDB runtime SHA sharding +SETNAME SSL struct stunnel From 53e3d332c78ab1617a32c36d1a07e3f40a1ef8cb Mon Sep 17 00:00:00 2001 From: ofekshenawa Date: Mon, 19 Feb 2024 10:06:27 +0200 Subject: [PATCH 3/6] Add analytics to wordlist --- .github/wordlist.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/wordlist.txt b/.github/wordlist.txt index a5f3428d9..e026e5110 100644 --- a/.github/wordlist.txt +++ b/.github/wordlist.txt @@ -2,6 +2,7 @@ ACLs autoload autoloader autoloading +analytics Autoloading backend backends From fb573f6852fff168492cd13259fb2135bda18072 Mon Sep 17 00:00:00 2001 From: ofekshenawa Date: Mon, 19 Feb 2024 16:59:49 +0200 Subject: [PATCH 4/6] syntax --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 2853fbbc4..662d2d036 100644 --- a/README.md +++ b/README.md @@ -164,15 +164,15 @@ func ExampleClient() *redis.Client { ### Advanced Configuration -go-redis supports extending the CLIENT SETNAME command to allow for custom client identification. This feature enables community members to append their own suffixes to the client name, facilitating a deeper understanding of Redis usage patterns. +go-redis supports extending the client identification phase to allow projects to send their own custom client identification. #### Default Client Identification -By default, go-redis automatically sets the client library name and version during the connection process. This behavior ensures that the Redis server is aware of the client's identity, which is crucial for monitoring, debugging, and analytics. +By default, go-redis automatically sends the client library name and version during the connection process. This feature is available in redis-server as of version 7.2. As a result, the command is "fire and forget", meaning it should fail silently, in the case that the redis server does not support this feature. #### Disabling Identity Verification -For use cases where connection identity verification is not required or needs to be explicitly disabled, go-redis provides the `DisableIdentity` configuration option. This option can be particularly useful in environments where Redis servers do not support `client setinfo`. +When connection identity verification is not required or needs to be explicitly disabled, a DisableIdentity configuration option exists. To disable verification, set the `DisableIdentity` option to `true` in the Redis client options: From 3e263b8aa568878678f759ca23eeff584e1b09bf Mon Sep 17 00:00:00 2001 From: ofekshenawa Date: Tue, 20 Feb 2024 11:43:22 +0200 Subject: [PATCH 5/6] Add DisableIdentity to wordlist --- .github/wordlist.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/wordlist.txt b/.github/wordlist.txt index e026e5110..52fdc1bcf 100644 --- a/.github/wordlist.txt +++ b/.github/wordlist.txt @@ -14,6 +14,7 @@ customizable Customizable dataset de +DisableIdentity ElastiCache extensibility FPM From de70fcc2024c65a3f3f13da80af5f9b12038d92e Mon Sep 17 00:00:00 2001 From: "Chayim I. Kirshen" Date: Tue, 20 Feb 2024 16:35:47 +0200 Subject: [PATCH 6/6] README update for accuracy --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 662d2d036..043d3f0e6 100644 --- a/README.md +++ b/README.md @@ -172,16 +172,16 @@ By default, go-redis automatically sends the client library name and version dur #### Disabling Identity Verification -When connection identity verification is not required or needs to be explicitly disabled, a DisableIdentity configuration option exists. +When connection identity verification is not required or needs to be explicitly disabled, a `DisableIndentity` configuration option exists. In V10 of this library, `DisableIndentity` will become `DisableIdentity` in order to fix the associated typo. -To disable verification, set the `DisableIdentity` option to `true` in the Redis client options: +To disable verification, set the `DisableIndentity` option to `true` in the Redis client options: ```go rdb := redis.NewClient(&redis.Options{ Addr: "localhost:6379", - Password: "", - DB: 0, - DisableIdentity: true, // Disable set-info on connect + Password: "", + DB: 0, + DisableIndentity: true, // Disable set-info on connect }) ```