You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Controls how the client requests the endpoint to reconnect to during a MOVING notification in Redis Enterprise maintenance.
166
161
*
167
-
* @example Graceful maintenance with timeout smoothing
168
-
* ```
169
-
* const client = createClient({
170
-
* gracefulMaintenance: {
171
-
* handleFailedCommands: 'retry',
172
-
* handleTimeouts: 5000, // Extend timeouts to 5 seconds during maintenance
173
-
* }
174
-
* });
175
-
* ```
162
+
* - `auto`: If the connection is opened to a name or IP address that is from/resolves to a reserved private IP range, request an internal endpoint (e.g., internal-ip), otherwise an external one. If TLS is enabled, then request a FQDN.
163
+
* - `internal-ip`: Enforce requesting the internal IP.
164
+
* - `internal-fqdn`: Enforce requesting the internal FQDN.
165
+
* - `external-ip`: Enforce requesting the external IP address.
166
+
* - `external-fqdn`: Enforce requesting the external FQDN.
167
+
* - `none`: Used to request a null endpoint, which tells the client to reconnect based on its current config
168
+
169
+
* The default is `auto`.
176
170
*/
177
-
gracefulMaintenance?: {
178
-
/**
179
-
* Designates how failed commands should be handled. A failed command is when the time isn’t sufficient to deal with the responses on the old connection before the server shuts it down
180
-
*/
181
-
handleFailedCommands?: 'exception'|'retry',
182
-
/**
183
-
* Specifies a more relaxed timeout (in milliseconds) for commands during a maintenance window.
184
-
* This helps minimize command timeouts during maintenance. If not provided, the `commandOptions.timeout`
185
-
* will be used instead. Timeouts during maintenance period result in a `CommandTimeoutDuringMaintanance` error.
186
-
*/
187
-
relaxedCommandTimeout?: number,
188
-
/**
189
-
* Specifies a more relaxed timeout (in milliseconds) for the socket during a maintenance window.
190
-
* This helps minimize socket timeouts during maintenance. If not provided, the `socket.timeout`
191
-
* will be used instead. Timeouts during maintenance period result in a `SocketTimeoutDuringMaintanance` error.
192
-
*/
193
-
relaxedSocketTimeout?: number
194
-
}
195
-
}
171
+
maintMovingEndpointType?: MovingEndpointType;
172
+
/**
173
+
* Specifies a more relaxed timeout (in milliseconds) for commands during a maintenance window.
174
+
* This helps minimize command timeouts during maintenance. If not provided, the `commandOptions.timeout`
175
+
* will be used instead. Timeouts during maintenance period result in a `CommandTimeoutDuringMaintanance` error.
176
+
*
177
+
* The default is 10000
178
+
*/
179
+
maintRelaxedCommandTimeout?: number;
180
+
/**
181
+
* Specifies a more relaxed timeout (in milliseconds) for the socket during a maintenance window.
182
+
* This helps minimize socket timeouts during maintenance. If not provided, the `socket.timeout`
183
+
* will be used instead. Timeouts during maintenance period result in a `SocketTimeoutDuringMaintanance` error.
184
+
*
185
+
* The default is 10000
186
+
*/
187
+
maintRelaxedSocketTimeout?: number;
188
+
};
196
189
197
190
typeWithCommands<
198
191
RESPextendsRespVersions,
@@ -519,15 +512,15 @@ export default class RedisClient<
0 commit comments