mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-11 20:40:20 +00:00
Added Redis retry_strategy
Most of the ClientOpts that have to do with reconnecting have been deprecated in favor of the `retry_strategy` property. The DefinitelyTyped repo is outdated and is missing the retry_strategy property. See the docs at https://github.com/NodeRedis/node_redis. The following options of ClientOpts are deprecated in favor of retry_strategy: - retry_max_delay - connect_timeout - max_attempts
This commit is contained in:
Vendored
+5
@@ -34,6 +34,10 @@ declare module "redis" {
|
||||
versions: number[];
|
||||
}
|
||||
|
||||
interface RetryStrategy {
|
||||
(options: {error: Error, total_retry_time: number, times_connected: number, attempt: number}): number;
|
||||
}
|
||||
|
||||
export interface ClientOpts {
|
||||
parser?: string;
|
||||
return_buffers?: boolean;
|
||||
@@ -50,6 +54,7 @@ declare module "redis" {
|
||||
family?: string;
|
||||
command_queue_high_water?: number;
|
||||
command_queue_low_water?: number;
|
||||
retry_strategy?: RetryStrategy;
|
||||
}
|
||||
|
||||
export interface RedisClient extends NodeJS.EventEmitter {
|
||||
|
||||
Reference in New Issue
Block a user