lib/orchestrator.js
function Orchestrator(options) {
  if (!(this instanceof Orchestrator)) return new Orchestrator(options);

  options = options || {};

  this.which = options.which || require('which').sync('haproxy');
  this.pid = options.pid || '';
  this.pidFile = options.pidFile || '';
  this.config = options.config;
  this.discover = options.discover || false;
  this.prefix = options.prefix || '';

  //
  // Discover a running process.
  //
  if (this.discover && !this.pid) this.read();
}
function Orchestrator(options) {
  if (!(this instanceof Orchestrator)) return new Orchestrator(options);

  options = options || {};

  this.which = options.which || require('which').sync('haproxy');
  this.pid = options.pid || '';
  this.pidFile = options.pidFile || '';
  this.config = options.config;
  this.discover = options.discover || false;
  this.prefix = options.prefix || '';

  //
  // Discover a running process.
  //
  if (this.discover && !this.pid) this.read();
}
function Orchestrator ( options ) { if ( ! ( this instanceof Orchestrator ) ) return new Orchestrator ( options ) ; options = options || { } ; this . which = options . which || require ( 'which' ) . sync ( 'haproxy' ) ; this . pid = options . pid || '' ; this . pidFile = options . pidFile || '' ; this . config = options . config ; this . discover = options . discover || false ; this . prefix = options . prefix || '' ; // // Discover a running process. // if ( this . discover && ! this . pid ) this . read ( ) ; }
Orchestrator is a haproxy interface that allows you to run and interact with
the `haproxy` binary.

Options:

- pid: The pid file
- pidFile: The location of the pid file
- config: The location of the configuration file
- [optional] discover: Tries to find your HAProxy instance if you don't know the pid
- [optional] which: The location of the haproxy

@constructor
@param {Object} options Orchestrator configuration.
@api public
Orchestrator is a haproxy interface that allows you to run and interact with the haproxy binary .