You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-01 16:46:54 +03:00
fix nodeAddressMap
docs (#2228)
This commit is contained in:
@ -49,13 +49,19 @@ This is a mapping of addresses and ports, with the values being the accessible a
|
|||||||
```javascript
|
```javascript
|
||||||
createCluster({
|
createCluster({
|
||||||
rootNodes: [{
|
rootNodes: [{
|
||||||
url: '10.0.0.1:30001'
|
url: 'external-host-1.io:30001'
|
||||||
}, {
|
}, {
|
||||||
url: '10.0.0.2:30002'
|
url: 'external-host-2.io:30002'
|
||||||
}],
|
}],
|
||||||
nodeAddressMap: {
|
nodeAddressMap: {
|
||||||
'10.0.0.1:30001': 'external-host-1.io:30001',
|
'10.0.0.1:30001': {
|
||||||
'10.0.0.2:30002': 'external-host-2.io:30002'
|
host: 'external-host-1.io',
|
||||||
|
port: 30001
|
||||||
|
},
|
||||||
|
'10.0.0.2:30002': {
|
||||||
|
host: 'external-host-2.io',
|
||||||
|
port: 30002
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
```
|
```
|
||||||
|
Reference in New Issue
Block a user