docs: function ClusterManager(opts) {
    if (isFunction(opts)) {
      opts = { worker: opts };
    }
    this.options = opts || {};
  
    this.givenNumWorkers =
      exists(this.options.numWorkers) ||
      exists(process.env.CLUSTER_WORKERS);
  
    defaults(this.options, {
      debugScope: process.env.CLUSTER_DEBUG || 'cluster-man',
      master: noop,
      numWorkers: process.env.CLUSTER_WORKERS || os.cpus().length,
      killOnError: true,
      beforeExit: function (err, done) {
        done();
      }
    });
  
    this._addLogger('info', [this.options.debugScope, 'info'].join(':'));
    this._addLogger('warning', [this.options.debugScope, 'warning'].join(':'));
    this._addLogger('error', [this.options.debugScope, 'error'].join(':'));
  
    if (!this.options.worker || !isFunction(this.options.worker)) {
      throw new Error('Cluster must be provided with a worker closure.');
    }
  
    if (!isFunction(this.options.beforeExit)) {
      this.log.warning('Before exit callback is not a function, removing.');
      this.options.beforeExit = noop;
    }
  
    this.workers = [];
  
    // This is here to expose the cluster without having to re-require in the
    // script that uses cluster-man
    this.cluster = cluster;
  }