DiscofyAPI/node_modules/mariadb/lib/config/pool-cluster-options.js

20 lines
545 B
JavaScript
Raw Permalink Normal View History

2021-03-25 17:23:36 +01:00
'use strict';
class PoolClusterOptions {
constructor(opts) {
if (opts) {
this.canRetry = opts.canRetry === undefined ? true : opts.canRetry;
this.removeNodeErrorCount = opts.removeNodeErrorCount || 5;
this.restoreNodeTimeout = opts.restoreNodeTimeout || 1000;
this.defaultSelector = opts.defaultSelector || 'RR';
} else {
this.canRetry = true;
this.removeNodeErrorCount = 5;
this.restoreNodeTimeout = 1000;
this.defaultSelector = 'RR';
}
}
}
module.exports = PoolClusterOptions;