feat: Add support for MongoDB databaseOptions keys minPoolSize, connectTimeoutMS, socketTimeoutMS (#9522)

This commit is contained in:
Colin Ulin
2025-01-27 20:21:40 -05:00
committed by GitHub
parent 3b20a6f039
commit 91618fe738
4 changed files with 30 additions and 0 deletions

View File

@@ -602,8 +602,14 @@ export interface DatabaseOptions {
maxTimeMS: ?number;
/* The MongoDB driver option to set the maximum replication lag for reads from secondary nodes.*/
maxStalenessSeconds: ?number;
/* The MongoDB driver option to set the minimum number of opened, cached, ready-to-use database connections maintained by the driver. */
minPoolSize: ?number;
/* The MongoDB driver option to set the maximum number of opened, cached, ready-to-use database connections maintained by the driver. */
maxPoolSize: ?number;
/* The MongoDB driver option to specify the amount of time, in milliseconds, to wait to establish a single TCP socket connection to the server before raising an error. Specifying 0 disables the connection timeout. */
connectTimeoutMS: ?number;
/* The MongoDB driver option to specify the amount of time, in milliseconds, spent attempting to send or receive on a socket before timing out. Specifying 0 means no timeout. */
socketTimeoutMS: ?number;
}
export interface AuthAdapter {