Files
lcbp3.np-dms.work/backend/node_modules/mariadb/lib/config/cluster-options.js
2025-09-21 20:29:15 +07:00

23 lines
650 B
JavaScript
Executable File

// SPDX-License-Identifier: LGPL-2.1-or-later
// Copyright (c) 2015-2024 MariaDB Corporation Ab
'use strict';
class ClusterOptions {
constructor(opts) {
if (opts) {
this.canRetry = opts.canRetry === undefined ? true : opts.canRetry;
this.removeNodeErrorCount = opts.removeNodeErrorCount || Infinity;
this.restoreNodeTimeout = opts.restoreNodeTimeout || 1000;
this.defaultSelector = opts.defaultSelector || 'RR';
} else {
this.canRetry = true;
this.removeNodeErrorCount = Infinity;
this.restoreNodeTimeout = 1000;
this.defaultSelector = 'RR';
}
}
}
module.exports = ClusterOptions;