pool-cluster-options.js 545 B

12345678910111213141516171819
  1. 'use strict';
  2. class PoolClusterOptions {
  3. constructor(opts) {
  4. if (opts) {
  5. this.canRetry = opts.canRetry === undefined ? true : opts.canRetry;
  6. this.removeNodeErrorCount = opts.removeNodeErrorCount || 5;
  7. this.restoreNodeTimeout = opts.restoreNodeTimeout || 1000;
  8. this.defaultSelector = opts.defaultSelector || 'RR';
  9. } else {
  10. this.canRetry = true;
  11. this.removeNodeErrorCount = 5;
  12. this.restoreNodeTimeout = 1000;
  13. this.defaultSelector = 'RR';
  14. }
  15. }
  16. }
  17. module.exports = PoolClusterOptions;