index.js
function ZD(conf) {
  if (!(this instanceof ZD)) return new ZD(conf);
  var config = ('string' === typeof conf) ? { conn: conf } : (conf || {});
  this.dubbo = config.dubbo;
  this.client = zookeeper.createClient(config.conn, {
    sessionTimeout: config.sessionTimeout,
    spinDelay: config.spinDelay,
    retries: config.retries
  });
}
function ZD(conf) {
  if (!(this instanceof ZD)) return new ZD(conf);
  var config = ('string' === typeof conf) ? { conn: conf } : (conf || {});
  this.dubbo = config.dubbo;
  this.client = zookeeper.createClient(config.conn, {
    sessionTimeout: config.sessionTimeout,
    spinDelay: config.spinDelay,
    retries: config.retries
  });
}
function ZD ( conf ) { if ( ! ( this instanceof ZD ) ) return new ZD ( conf ) ; var config = ( 'string' === typeof conf ) ? { conn : conf } : ( conf || { } ) ; this . dubbo = config . dubbo ; this . client = zookeeper . createClient ( config . conn , { sessionTimeout : config . sessionTimeout , spinDelay : config . spinDelay , retries : config . retries } ) ; }
Constructor of ZD.

@param {String|Object} conf // A String of host:port pairs or an object to set options.
{
dubbo: String // Dubbo version information.

// The following content could reference:
//     https://github.com/alexguan/node-zookeeper-client#client-createclientconnectionstring-options

conn: String, // Comma separated host:port pairs, each represents a ZooKeeper server
sessionTimeout: Number, // Session timeout in milliseconds, defaults to 30 seconds.
spinDelay: Number, // The delay (in milliseconds) between each connection attempts.
retries: Number // The number of retry attempts for connection loss exception.
}
@returns {ZD}
@constructor
Constructor of ZD .