From 7b7d0d2a369385345d346c66a655641ed1e4083c Mon Sep 17 00:00:00 2001 From: Leibale Eidelman Date: Mon, 15 Aug 2022 08:39:44 -0400 Subject: [PATCH] fix `nodeAddressMap` docs (#2228) --- docs/clustering.md | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/docs/clustering.md b/docs/clustering.md index bf88be6cde..b1b5b82021 100644 --- a/docs/clustering.md +++ b/docs/clustering.md @@ -49,13 +49,19 @@ This is a mapping of addresses and ports, with the values being the accessible a ```javascript createCluster({ 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: { - '10.0.0.1:30001': 'external-host-1.io:30001', - '10.0.0.2:30002': 'external-host-2.io:30002' + '10.0.0.1:30001': { + host: 'external-host-1.io', + port: 30001 + }, + '10.0.0.2:30002': { + host: 'external-host-2.io', + port: 30002 + } } }); ```