Skip to content

Commit

Permalink
feat(topologies): expose underlaying `logicalSessionTimeoutMinutes'
Browse files Browse the repository at this point in the history
  • Loading branch information
mbroadst committed Oct 12, 2017
1 parent fe92207 commit 1609a37
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/topologies/mongos.js
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,13 @@ Object.defineProperty(Mongos.prototype, 'haInterval', {
}
});

Object.defineProperty(Mongos.prototype, 'logicalSessionTimeoutMinutes', {
enumerable: true,
get: function() {
return this.s.coreTopology.logicalSessionTimeoutMinutes;
}
});

// Connect
Mongos.prototype.connect = function(db, _options, callback) {
var self = this;
Expand Down
7 changes: 7 additions & 0 deletions lib/topologies/replset.js
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,13 @@ Object.defineProperty(ReplSet.prototype, 'haInterval', {
}
});

Object.defineProperty(ReplSet.prototype, 'logicalSessionTimeoutMinutes', {
enumerable: true,
get: function() {
return this.s.coreTopology.logicalSessionTimeoutMinutes;
}
});

var define = (ReplSet.define = new Define('ReplSet', ReplSet, false));

// Ensure the right read Preference object
Expand Down
7 changes: 7 additions & 0 deletions lib/topologies/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,13 @@ Object.defineProperty(Server.prototype, 'port', {
}
});

Object.defineProperty(Server.prototype, 'logicalSessionTimeoutMinutes', {
enumerable: true,
get: function() {
return this.s.coreTopology.logicalSessionTimeoutMinutes;
}
});

// Connect
// Server.prototype.connect = function(db, _options, callback) {
Server.prototype.connect = function(_options, callback) {
Expand Down

0 comments on commit 1609a37

Please sign in to comment.