Skip to content

Commit 7b7d0d2

Browse files
authored
fix nodeAddressMap docs (#2228)
1 parent f3462ab commit 7b7d0d2

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

docs/clustering.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,19 @@ This is a mapping of addresses and ports, with the values being the accessible a
4949
```javascript
5050
createCluster({
5151
rootNodes: [{
52-
url: '10.0.0.1:30001'
52+
url: 'external-host-1.io:30001'
5353
}, {
54-
url: '10.0.0.2:30002'
54+
url: 'external-host-2.io:30002'
5555
}],
5656
nodeAddressMap: {
57-
'10.0.0.1:30001': 'external-host-1.io:30001',
58-
'10.0.0.2:30002': 'external-host-2.io:30002'
57+
'10.0.0.1:30001': {
58+
host: 'external-host-1.io',
59+
port: 30001
60+
},
61+
'10.0.0.2:30002': {
62+
host: 'external-host-2.io',
63+
port: 30002
64+
}
5965
}
6066
});
6167
```

0 commit comments

Comments
 (0)