struct Mongo::Options
- Mongo::Options
- Struct
- Value
- Object
Overview
A set of options used to configure the driver.
NOTE For more details, see the uri options specification document.
Included Modules
- Mongo::Tools::Initializer
Defined in:
cryomongo/uri/options.crConstructors
Instance Method Summary
-
#appname : String | Nil
Passed into the server in the client metadata as part of the connection handshake
-
#auth_mechanism : String | Nil
The authentication mechanism method to use for connection to the server
-
#auth_mechanism_properties : String | Nil
Additional options provided for authentication (e.g.
-
#auth_source : String | Nil
The database that connections should authenticate against
-
#auth_source=(auth_source : String | Nil)
The database that connections should authenticate against
-
#compressors : String | Nil
The list of allowed compression types for wire protocol messages sent or received from the server
-
#connect_timeout : Time::Span | Nil
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
-
#direct_connection : Bool | Nil
Whether to connect to the deployment in Single topology.
-
#dns_resolver : DNS::Resolver | Nil
Use custom dns resolver.
-
#heartbeat_frequency : Time::Span
The interval between regular server monitoring checks
-
#heartbeat_frequency=(heartbeat_frequency : Time::Span)
The interval between regular server monitoring checks
-
#journal : Bool | Nil
Default write concern "j" field for the client
-
#local_threshold : Time::Span
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
-
#max_idle_time : Time::Span | Nil
The amount of time a connection can be idle before it's closed
-
#max_pool_size : Int32
The maximum number of clients or connections able to be created by a pool at a given time
-
#max_staleness_seconds : Int32 | Nil
The maximum replication lag, in wall clock time, that a secondary can suffer and still be eligible for server selection
-
#min_pool_size : Int32
The maximum number of clients or connections able to be created by a pool at a given time
- #mix_with_query_params(options_hash : HTTP::Params)
- #raw : HTTP::Params
- #raw? : HTTP::Params | Nil
-
#read_concern_level : String | Nil
Default read concern for the client
-
#read_preference : String | Nil
Default read preference for the client (excluding tags)
-
#read_preference_tags : Array(String)
Default read preference tags for the client; only valid if the read preference mode is not primary
-
#replica_set : String | Nil
The name of the replica set to connect to
-
#replica_set=(replica_set : String | Nil)
The name of the replica set to connect to
-
#retry_reads : Bool | Nil
Enables retryable reads on server 3.6+
-
#retry_writes : Bool | Nil
Enables retryable writes on server 3.6+
-
#server_selection_timeout : Time::Span
A timeout in milliseconds to block for server selection before raising an error
-
#server_selection_timeout=(server_selection_timeout : Time::Span)
A timeout in milliseconds to block for server selection before raising an error
-
#server_selection_try_once : Bool
Scan the topology only once after a server selection failure instead of repeatedly until the server selection times out
-
#server_selection_try_once=(server_selection_try_once : Bool)
Scan the topology only once after a server selection failure instead of repeatedly until the server selection times out
-
#socket_timeout : Time::Span | Nil
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
-
#ssl : Bool | Nil
Alias of "tls"; required to ensure that Atlas connection strings continue to work
-
#ssl=(ssl : Bool | Nil)
Alias of "tls"; required to ensure that Atlas connection strings continue to work
-
#tls : Bool | Nil
Whether or not to require TLS for connections to the server
-
#tls_allow_invalid_certificates : Bool | Nil
Specifies whether or not the driver should error when the server’s TLS certificate is invalid
-
#tls_allow_invalid_hostnames : Bool | Nil
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
-
#tls_ca_file : String | Nil
Path to file with either a single or bundle of certificate authorities to be considered trusted when making a TLS connection
-
#tls_certificate_key_file : String | Nil
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
-
#tls_certificate_key_file_password : String | Nil
Password to decrypt the client private key to be used for TLS connections
-
#tls_disable_certificate_revocation_check : Bool | Nil
Controls whether or not the driver will check a certificate's revocation status via CRLs or OCSP.
-
#tls_disable_ocsp_endpoint_check : Bool | Nil
Controls whether or not the driver will reach out to OCSP endpoints if needed.
-
#tls_insecure : Bool | Nil
Relax TLS constraints as much as possible (e.g.
- #validate(raw_hash)
-
#w : Int32 | String | Nil
Default write concern "w" field for the client
-
#w_timeout : Time::Span | Nil
Default write concern "wtimeout" field for the client
-
#wait_queue_timeout : Time::Span | Nil
The maximum amount of time a fiber can wait for a connection to become available
-
#zlib_compression_level : Int32 | Nil
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
Constructor Detail
Instance Method Detail
Passed into the server in the client metadata as part of the connection handshake
The authentication mechanism method to use for connection to the server
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 amount of time a connection can be idle before it's closed
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