ravendb
Version:
RavenDB client for Node.js
36 lines • 940 B
JavaScript
export class ClusterTopology {
lastNodeId;
topologyId;
etag;
members;
promotables;
watchers;
contains(node) {
if (this.members && this.members[node]) {
return true;
}
if (this.promotables && this.promotables[node]) {
return true;
}
return this.watchers && this.watchers[node];
}
getUrlFromTag(tag) {
if (!tag) {
return null;
}
if (this.members && this.members[tag]) {
return this.members[tag];
}
if (this.promotables && this.promotables[tag]) {
return this.promotables[tag];
}
if (this.watchers && this.watchers[tag]) {
return this.watchers[tag];
}
return null;
}
getAllNodes() {
return Object.assign({}, this.members, this.promotables, this.watchers);
}
}
//# sourceMappingURL=ClusterTopology.js.map