Skip to content

Commit 9ea72df

Browse files
DOC-5712 updated Go config details
1 parent 009d893 commit 9ea72df

File tree

1 file changed

+13
-7
lines changed

1 file changed

+13
-7
lines changed

content/develop/clients/go/connect.md

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -136,16 +136,20 @@ lets a client take action to avoid disruptions in service.
136136
See [Smart client handoffs]({{< relref "/develop/clients/sch" >}})
137137
for more information about SCH.
138138

139-
To enable SCH on the client, add the `HitlessUpgrades` option during the
139+
To enable SCH on the client, add the `MaintNotificationsConfig` option during the
140140
connection, as shown in the following example:
141141

142142
```go
143143
rdb := redis.NewClient(&redis.Options{
144144
Addr: "localhost:6379",
145145
Protocol: 3, // RESP3 required
146-
HitlessUpgrades: &hitless.Config{
147-
Mode: hitless.MaintNotificationsEnabled,
148-
RelaxedTimeout: 10 * time.Second,
146+
MaintNotificationsConfig: &maintnotifications.Config{
147+
Mode: maintnotifications.ModeEnabled,
148+
EndpointType: maintnotifications.EndpointTypeExternalIP,
149+
HandoffTimeout: 10 * time.Second,
150+
RelaxedTimeout: 10 * time.Second,
151+
PostHandoffRelaxedDuration: 10 * time.Second,
152+
MaxHandoffRetries: 5,
149153
},
150154
})
151155
```
@@ -154,11 +158,13 @@ rdb := redis.NewClient(&redis.Options{
154158
protocol, so you must set `Protocol:3` explicitly when you connect.
155159
{{< /note >}}
156160

157-
The `hitless.Config` object accepts the following parameters:
161+
The `maintnotifications.Config` object accepts the following parameters:
158162

159163
| Name | Description |
160164
|------ |------------- |
161-
| `Mode` | Whether or not to enable SCH. The options are `hitless.MaintNotificationsDisabled`, `hitless.MaintNotificationsEnabled` (require SCH and abort the connection if not supported), and `hitless.MaintNotificationsAuto` (require SCH and fall back to a non-SCH connection if not supported). The default is `hitless.MaintNotificationsAuto`. |
162-
| `RelaxedTimeout` | The timeout to use for commands and connections while the server is performing maintenance. The default is 10 seconds. |
165+
| `Mode` | Whether or not to enable SCH. The options are `ModeDisabled`, `ModeEnabled` (require SCH and abort the connection if not supported), and `ModeAuto` (require SCH and fall back to a non-SCH connection if not supported). The default is `ModeAuto`. |
166+
| `EndpointType` | The type of endpoint to use for the connection. The options are `EndpointTypeExternalIP`, `EndpointTypeInternalIP`, `EndpointTypeExternalFQDN`, `EndpointTypeInternalFQDN`, `EndpointTypeAuto` (auto-detect based on connection), and `EndpointTypeNone` (reconnect with current config). The default is `EndpointTypeExternalIP`. |
163167
| `HandoffTimeout` | The timeout to connect to the replacement node. The default is 15 seconds. |
168+
| `RelaxedTimeout` | The timeout to use for commands and connections while the server is performing maintenance. The default is 10 seconds. |
169+
| `PostHandoffRelaxedDuration` | The duration to continue using relaxed timeouts after a successful handoff (this provides extra resilience during cluster transitions). The default is 20 seconds. |
164170
| `MaxHandoffRetries` | The maximum number of times to retry connecting to the replacement node. The default is 3. |

0 commit comments

Comments
 (0)