Implemented connection to cluster using gossip seeds
This commit is contained in:
13
src/gossipSeed.js
Normal file
13
src/gossipSeed.js
Normal 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
|
||||
}
|
||||
});
|
||||
};
|
Reference in New Issue
Block a user