Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 uid=33(www-data) gid=33(www-data) groups=33(www-data) Safe-mode: OFF (not secure) /var/www/html/OTapi/node_modules/mongodb/lib/sdam/ drwxr-xr-x | |
| Viewing file: Select action/file-type: "use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.WaitingForSuitableServerEvent = exports.ServerSelectionSucceededEvent = exports.ServerSelectionFailedEvent = exports.ServerSelectionStartedEvent = exports.ServerSelectionEvent = void 0;
const utils_1 = require(".././utils");
const constants_1 = require("../constants");
/**
* The base export class for all logs published from server selection
* @internal
* @category Log Type
*/
class ServerSelectionEvent {
/** @internal */
constructor(selector, topologyDescription, operation) {
this.selector = selector;
this.operation = operation;
this.topologyDescription = topologyDescription;
}
}
exports.ServerSelectionEvent = ServerSelectionEvent;
/**
* An event published when server selection starts
* @internal
* @category Event
*/
class ServerSelectionStartedEvent extends ServerSelectionEvent {
/** @internal */
constructor(selector, topologyDescription, operation) {
super(selector, topologyDescription, operation);
/** @internal */
this.name = constants_1.SERVER_SELECTION_STARTED;
this.message = 'Server selection started';
}
}
exports.ServerSelectionStartedEvent = ServerSelectionStartedEvent;
/**
* An event published when a server selection fails
* @internal
* @category Event
*/
class ServerSelectionFailedEvent extends ServerSelectionEvent {
/** @internal */
constructor(selector, topologyDescription, error, operation) {
super(selector, topologyDescription, operation);
/** @internal */
this.name = constants_1.SERVER_SELECTION_FAILED;
this.message = 'Server selection failed';
this.failure = error;
}
}
exports.ServerSelectionFailedEvent = ServerSelectionFailedEvent;
/**
* An event published when server selection succeeds
* @internal
* @category Event
*/
class ServerSelectionSucceededEvent extends ServerSelectionEvent {
/** @internal */
constructor(selector, topologyDescription, address, operation) {
super(selector, topologyDescription, operation);
/** @internal */
this.name = constants_1.SERVER_SELECTION_SUCCEEDED;
this.message = 'Server selection succeeded';
const { host, port } = utils_1.HostAddress.fromString(address).toHostPort();
this.serverHost = host;
this.serverPort = port;
}
}
exports.ServerSelectionSucceededEvent = ServerSelectionSucceededEvent;
/**
* An event published when server selection is waiting for a suitable server to become available
* @internal
* @category Event
*/
class WaitingForSuitableServerEvent extends ServerSelectionEvent {
/** @internal */
constructor(selector, topologyDescription, remainingTimeMS, operation) {
super(selector, topologyDescription, operation);
/** @internal */
this.name = constants_1.WAITING_FOR_SUITABLE_SERVER;
this.message = 'Waiting for suitable server to become available';
this.remainingTimeMS = remainingTimeMS;
}
}
exports.WaitingForSuitableServerEvent = WaitingForSuitableServerEvent;
//# sourceMappingURL=server_selection_events.js.map |
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0042 ]-- |