From e5844734d671a1e35bbb742f9105fc811d61e066 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Borntr=C3=A4ger?= Date: Wed, 19 Feb 2020 18:05:28 +0100 Subject: [PATCH] docs(README): Formatted Cluster docs (#1063) --- README.md | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index e180ad5a..b42d8ce5 100644 --- a/README.md +++ b/README.md @@ -841,21 +841,21 @@ cluster.get("foo", function(err, res) { ioredis will try to reconnect to the startup nodes from scratch after the specified delay (in ms). Otherwise, an error of "None of startup nodes is available" will be returned. The default value of this option is: - ```javascript - function (times) { - var delay = Math.min(100 + times * 2, 2000); - return delay; - } - ``` - - It's possible to modify the `startupNodes` property in order to switch to another set of nodes here: - - ```javascript - function (times) { - this.startupNodes = [{ port: 6790, host: '127.0.0.1' }]; - return Math.min(100 + times * 2, 2000); - } - ``` + ```javascript + function (times) { + var delay = Math.min(100 + times * 2, 2000); + return delay; + } + ``` + + It's possible to modify the `startupNodes` property in order to switch to another set of nodes here: + + ```javascript + function (times) { + this.startupNodes = [{ port: 6790, host: '127.0.0.1' }]; + return Math.min(100 + times * 2, 2000); + } + ``` - `dnsLookup`: Alternative DNS lookup function (`dns.lookup()` is used by default). It may be useful to override this in special cases, such as when AWS ElastiCache used with TLS enabled. - `enableOfflineQueue`: Similar to the `enableOfflineQueue` option of `Redis` class.