lib/druid.js
function Druid(connectionString, discoveryPath, options) {
  EventEmitter.call(this)
  this.setMaxListeners(0)

  if (arguments.length === 2) {
    options = {}
  }


  /**
   * Services discovery path
   *
   * @protected
   * @type {string}
   */
  this.discoveryPath = discoveryPath


  /**
   * Client options
   *
   * @protected
   */
  this.options = options


  /**
   * (Re)loaded info about nodes and datasources
   *
   * @public
   * @type {boolean}
   */
  this.ready;


  /**
   * Nodes (id -> node)
   *
   * @protected
   */
  this.nodes = {}


  /**
   * Nodes associated with each data source (dataSource -> [nodeA, nodeB, ..., nodeN])
   *
   * @protected
   */
  this.dataSources = {}


  /**
   * ZooKeeper client
   *
   * @protected
   */
  initZookeeper(this, connectionString)
}
function Druid(connectionString, discoveryPath, options) {
  EventEmitter.call(this)
  this.setMaxListeners(0)

  if (arguments.length === 2) {
    options = {}
  }


  /**
   * Services discovery path
   *
   * @protected
   * @type {string}
   */
  this.discoveryPath = discoveryPath


  /**
   * Client options
   *
   * @protected
   */
  this.options = options


  /**
   * (Re)loaded info about nodes and datasources
   *
   * @public
   * @type {boolean}
   */
  this.ready;


  /**
   * Nodes (id -> node)
   *
   * @protected
   */
  this.nodes = {}


  /**
   * Nodes associated with each data source (dataSource -> [nodeA, nodeB, ..., nodeN])
   *
   * @protected
   */
  this.dataSources = {}


  /**
   * ZooKeeper client
   *
   * @protected
   */
  initZookeeper(this, connectionString)
}
function Druid ( connectionString , discoveryPath , options ) { EventEmitter . call ( this ) this . setMaxListeners ( 0 ) if ( arguments . length === 2 ) { options = { } } /**
   * Services discovery path
   *
   * @protected
   * @type {string}
   */ this . discoveryPath = discoveryPath /**
   * Client options
   *
   * @protected
   */ this . options = options /**
   * (Re)loaded info about nodes and datasources
   *
   * @public
   * @type {boolean}
   */ this . ready ; /**
   * Nodes (id -> node)
   *
   * @protected
   */ this . nodes = { } /**
   * Nodes associated with each data source (dataSource -> [nodeA, nodeB, ..., nodeN])
   *
   * @protected
   */ this . dataSources = { } /**
   * ZooKeeper client
   *
   * @protected
   */ initZookeeper ( this , connectionString ) }
Druid client relying on ZooKeeper nodes data

@constructor
@extends EventEmitter
@param {string} connectionString ZooKeeper connection string
@param {string} discoveryPath Nodes discovery path
@param {object} [options] node-zookeeper-client options
@param {boolean} [options.preferSSL] Prefer SSL connection to Druid nodes if available
@param {boolean} [options.zookeeper] node-zookeeper-client createClient() options
Druid client relying on ZooKeeper nodes data