ravendb
Version:
RavenDB client for Node.js
34 lines • 1.07 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.AddClusterNodeCommand = void 0;
const RavenCommand_js_1 = require("../../../Http/RavenCommand.js");
const RaftIdGenerator_js_1 = require("../../../Utility/RaftIdGenerator.js");
class AddClusterNodeCommand extends RavenCommand_js_1.RavenCommand {
_url;
_tag;
_watcher;
constructor(url, tag, watcher = false) {
super();
this._url = url;
this._tag = tag;
this._watcher = watcher;
}
get isReadRequest() {
return false;
}
createRequest(node) {
let uri = node.url + "/admin/cluster/node?url=" + this._urlEncode(this._url) + "&watcher=" + this._watcher;
if (this._tag) {
uri += "&tag=" + this._tag;
}
return {
uri,
method: "Put"
};
}
getRaftUniqueRequestId() {
return RaftIdGenerator_js_1.RaftIdGenerator.newId();
}
}
exports.AddClusterNodeCommand = AddClusterNodeCommand;
//# sourceMappingURL=AddClusterNodeCommand.js.map