Implemented connection to cluster using gossip seeds

This commit is contained in:
Nicolas Dextraze
2016-10-15 15:41:25 -07:00
parent 4ea996781f
commit dd1302f641
10 changed files with 351 additions and 303 deletions

13
src/gossipSeed.js Normal file
View File

@ -0,0 +1,13 @@
module.exports = function GossipSeed(endPoint, hostName) {
if (typeof endPoint !== 'object' || !endPoint.hostname || !endPoint.port) throw new TypeError('endPoint must be have hostname and port properties.');
Object.defineProperties(this, {
endPoint: {
enumerable: true,
value: endPoint
},
hostName: {
enumerable: true,
value: hostName
}
});
};