Skip to content

Commit

Permalink
docs(README): Formatted Cluster docs (#1063)
Browse files Browse the repository at this point in the history
  • Loading branch information
BorntraegerMarc committed Feb 19, 2020
1 parent 4a13a1b commit e584473
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions README.md
Expand Up @@ -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.
Expand Down

0 comments on commit e584473

Please sign in to comment.