Mongo::Options
Inherits Mongo::Tools::Initializer / Struct / Value / Object
A set of options used to configure the driver.
NOTE: For more details, see the uri options specification document.
Constructors
Instance methods
Additional options provided for authentication (e.g. to enable hostname canonicalization for GSSAPI)
The database that connections should authenticate against
The list of allowed compression types for wire protocol messages sent or received from the server
Amount of time to wait for a single TCP socket connection to the server to be established before erroring; note that this applies to SDAM isMaster operations
Use custom dns resolver. Non-standard.
By default, the Cloudflare public DNS is used. (1.1.1.1)
The interval between regular server monitoring checks
The amount of time beyond the fastest round trip time that a given server’s round trip time can take and still be eligible for server selection
The maximum number of clients or connections able to be created by a pool at a given time
The maximum replication lag, in wall clock time, that a secondary can suffer and still be eligible for server selection
The maximum number of clients or connections able to be created by a pool at a given time
Default read preference tags for the client; only valid if the read preference mode is not primary
A timeout in milliseconds to block for server selection before raising an error
A timeout in milliseconds to block for server selection before raising an error
Scan the topology only once after a server selection failure instead of repeatedly until the server selection times out
Scan the topology only once after a server selection failure instead of repeatedly until the server selection times out
Amount of time spent attempting to send or receive on a socket before timing out; note that this only applies to application operations, not SDAM
Alias of "tls"; required to ensure that Atlas connection strings continue to work
Alias of "tls"; required to ensure that Atlas connection strings continue to work
Specifies whether or not the driver should error when the server’s TLS certificate is invalid
Specifies whether or not the driver should error when there is a mismatch between the server’s hostname and the hostname specified by the TLS certificate
Path to file with either a single or bundle of certificate authorities to be considered trusted when making a TLS connection
Path to the client certificate file or the client private key file; in the case that they both are needed, the files should be concatenated
Password to decrypt the client private key to be used for TLS connections
Controls whether or not the driver will check a certificate's revocation status via CRLs or OCSP. See the OCSP Support Spec for additional information.
Controls whether or not the driver will reach out to OCSP endpoints if needed. See the OCSP Support Spec for additional information.
Relax TLS constraints as much as possible (e.g. allowing invalid certificates or hostname mismatches); drivers must document the exact constraints which are relaxed by this option being true
The maximum amount of time a fiber can wait for a connection to become available
Specifies the level of compression when using zlib to compress wire protocol messages; -1 signifies the default level, 0 signifies no compression, 1 signifies the fastest speed, and 9 signifies the best compression