Skip to content

Commit 1609a37

Browse files
committed
feat(topologies): expose underlaying `logicalSessionTimeoutMinutes'
NODE-1088
1 parent fe92207 commit 1609a37

File tree

3 files changed

+21
-0
lines changed

3 files changed

+21
-0
lines changed

lib/topologies/mongos.js

+7
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,13 @@ Object.defineProperty(Mongos.prototype, 'haInterval', {
266266
}
267267
});
268268

269+
Object.defineProperty(Mongos.prototype, 'logicalSessionTimeoutMinutes', {
270+
enumerable: true,
271+
get: function() {
272+
return this.s.coreTopology.logicalSessionTimeoutMinutes;
273+
}
274+
});
275+
269276
// Connect
270277
Mongos.prototype.connect = function(db, _options, callback) {
271278
var self = this;

lib/topologies/replset.js

+7
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,13 @@ Object.defineProperty(ReplSet.prototype, 'haInterval', {
291291
}
292292
});
293293

294+
Object.defineProperty(ReplSet.prototype, 'logicalSessionTimeoutMinutes', {
295+
enumerable: true,
296+
get: function() {
297+
return this.s.coreTopology.logicalSessionTimeoutMinutes;
298+
}
299+
});
300+
294301
var define = (ReplSet.define = new Define('ReplSet', ReplSet, false));
295302

296303
// Ensure the right read Preference object

lib/topologies/server.js

+7
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,13 @@ Object.defineProperty(Server.prototype, 'port', {
288288
}
289289
});
290290

291+
Object.defineProperty(Server.prototype, 'logicalSessionTimeoutMinutes', {
292+
enumerable: true,
293+
get: function() {
294+
return this.s.coreTopology.logicalSessionTimeoutMinutes;
295+
}
296+
});
297+
291298
// Connect
292299
// Server.prototype.connect = function(db, _options, callback) {
293300
Server.prototype.connect = function(_options, callback) {

0 commit comments

Comments
 (0)