f79a0444f6
* Discovering process adapted from EventStore scala client * Use DNS for first discover but also for reconnoctions (the aim is to be able to reconnect even if all nodes have new IP addresses eg. after rolling update in a cloud environment) * Being able to perform proper unit testing
9 lines
340 B
JavaScript
9 lines
340 B
JavaScript
function GossipSeed(endPoint, hostName, hostHeader) {
|
|
if (typeof endPoint !== 'object' || !endPoint.host || !endPoint.port) throw new TypeError('endPoint must be have host and port properties.');
|
|
this.endPoint = endPoint;
|
|
this.hostName = hostName;
|
|
this.hostHeader = hostHeader;
|
|
Object.freeze(this);
|
|
}
|
|
|
|
module.exports = GossipSeed; |