1
0
mirror of https://github.com/redis/go-redis.git synced 2025-10-23 08:08:28 +03:00

chore(docs): explain why MaxRetries is disabled for ClusterClient (#3551)

Co-authored-by: Nedyalko Dyakov <1547186+ndyakov@users.noreply.github.com>
This commit is contained in:
Justin
2025-10-21 17:33:58 +05:30
committed by Nedyalko Dyakov
parent b11f928dea
commit 8ca7979664

View File

@@ -77,6 +77,10 @@ type ClusterOptions struct {
CredentialsProviderContext func(ctx context.Context) (username string, password string, err error)
StreamingCredentialsProvider auth.StreamingCredentialsProvider
// MaxRetries is the maximum number of retries before giving up.
// For ClusterClient, retries are disabled by default (set to -1),
// because the cluster client handles all kinds of retries internally.
// This is intentional and differs from the standalone Options default.
MaxRetries int
MinRetryBackoff time.Duration
MaxRetryBackoff time.Duration