lib/serviceDiscovery/engines/zookeeper/index.js
function ZooKeeperService(name, type, options) {
	this.name = name;
	this.type = type;
	this.options = options;

	this.closed = false;
	this.announcing = false;
	this.discovering = false;

	// this is the base path we will use to announce this service
	this.baseAnnouncePath = ['/mage', this.name, this.type].join('/');

	// those are the nodes we know on the given path
	this.nodes = [];

	// node data is stored apart
	this.services = {};

	this.connectTimer = null;
	this.clearCredentialsTimer = null;

	// Initial setup
	this.reset();
}
function ZooKeeperService(name, type, options) {
	this.name = name;
	this.type = type;
	this.options = options;

	this.closed = false;
	this.announcing = false;
	this.discovering = false;

	// this is the base path we will use to announce this service
	this.baseAnnouncePath = ['/mage', this.name, this.type].join('/');

	// those are the nodes we know on the given path
	this.nodes = [];

	// node data is stored apart
	this.services = {};

	this.connectTimer = null;
	this.clearCredentialsTimer = null;

	// Initial setup
	this.reset();
}
function ZooKeeperService ( name , type , options ) { this . name = name ; this . type = type ; this . options = options ; this . closed = false ; this . announcing = false ; this . discovering = false ; // this is the base path we will use to announce this service this . baseAnnouncePath = [ '/mage' , this . name , this . type ] . join ( '/' ) ; // those are the nodes we know on the given path this . nodes = [ ] ; // node data is stored apart this . services = { } ; this . connectTimer = null ; this . clearCredentialsTimer = null ; // Initial setup this . reset ( ) ; }
This is our service instance for zookeeper

@param {string} name    The name of the service we want to announce
@param {string} type    The type of service (tcp or udp)
@param {Object} options The options to provide to the service
@constructor
This is our service instance for zookeeper