You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -30,51 +27,55 @@ string URI to specify the behavior of the client. To learn more about connection
30
27
* - **appName**
31
28
- String
32
29
- None
33
-
- Specifies the application name that the ``Client`` instance sends to the server as part of the handshake.
34
-
Specifying an ``appName`` can help you use the server logs to determine which ``Client`` instance is connected
35
-
to the server.
30
+
- | Specifies the application name that the ``Client`` instance sends
31
+
to the server as part of the handshake.
32
+
| Specifying an ``appName`` can help you use the server logs to
33
+
determine which ``Client`` instance is connected to the server.
36
34
37
35
* - **authMechanism**
38
36
- String
39
37
- None
40
-
- Specifies which authentication mechanism to use.
41
-
If you do not specify this option, the driver uses the default authentication mechanism.
38
+
- Specifies which authentication mechanism to use. If you do not
39
+
specify this option, the driver uses the default authentication
40
+
mechanism.
42
41
43
42
* - **authMechanismProperties**
44
43
- String
45
44
- None
46
-
- Specifies additional properties for the authentication mechanism set in the ``authMechanism`` option.
47
-
specified in the ``authMechanism`` option.
45
+
- Specifies additional properties for the authentication mechanism
46
+
set in the ``authMechanism`` option.
48
47
49
48
* - **authSource**
50
49
- String
51
50
- See description
52
-
- Specifies the database used to authenticate.
53
-
This option defaults to ``admin`` for SCRAM-based authentication mechanisms,
54
-
``$external`` for the ``MONGODB-X509`` mechanism, and the database name or
55
-
``$external`` for the ``PLAIN`` mechanism.
51
+
- | Specifies the database used to authenticate.
52
+
| This option defaults to ``admin`` for SCRAM-based authentication mechanisms,
53
+
``$external`` for the ``MONGODB-X509`` mechanism, and the database name or
54
+
``$external`` for the ``PLAIN`` mechanism.
56
55
57
56
* - **compressors**
58
57
- A comma-separated list of strings
59
58
- None
60
59
- Specifies compressors that the ``Client`` instance uses in the specified order.
61
60
To learn more about network compression, see the :ref:`rust-network-compression` guide.
62
61
63
-
* - ***connectTimeoutMS***
62
+
* - **connectTimeoutMS**
64
63
- Non-negative integer
65
64
- ``10000`` (10 seconds)
66
-
- Specifies the connection timeout, in milliseconds, passed to each underlying TCP stream when attempting to connect to the server.
65
+
- Specifies the connection timeout, in milliseconds, passed to each
66
+
underlying TCP stream when attempting to connect to the server.
67
67
68
-
* - **direct**
68
+
* - **directConnection**
69
69
- Boolean
70
70
- ``false``
71
71
- Specifies whether the ``Client`` instance directly connects to a single host
72
-
instead of discovering and connecting to all of the servers in the cluster.
72
+
instead of discovering and connecting to all servers in the cluster.
73
73
74
74
* - **heartbeatFrequencyMS**
75
75
- Integer greater than or equal to 500
76
76
- ``10000`` (10 seconds)
77
-
- Specifies the amount of time, in milliseconds, that each monitoring thread waits between performing server checks.
77
+
- Specifies the amount of time, in milliseconds, that each
78
+
monitoring thread waits between performing server checks.
78
79
79
80
* - **journal**
80
81
- Boolean
@@ -84,38 +85,46 @@ string URI to specify the behavior of the client. To learn more about connection
84
85
* - **localThresholdMS**
85
86
- Non-negative integer
86
87
- 15
87
-
- Specifies how much longer, in milliseconds, that the average round trip time between the driver and server can take
88
-
compared to the shortest round trip time of all the suitable servers.
89
-
A value of ``0`` indicates that there is no latency window, so only the server with the lowest average round trip time is eligible.
88
+
- | Specifies how much longer, in milliseconds, that the average
89
+
round-trip time between the driver and server can take
90
+
compared to the shortest round-trip time of all the suitable servers.
91
+
| A value of ``0`` indicates that there is no latency window, so
92
+
only the server with the lowest average round-trip time is
93
+
eligible.
90
94
91
95
* - **maxIdleTimeMS**
92
96
- Non-negative integer
93
97
- 0
94
-
- Specifies the amount of time, in milliseconds, that a connection can remain idle in a connection pool the server closes it.
95
-
A value of ``0`` indicates that the client does not close idle connections.
98
+
- | Specifies the amount of time, in milliseconds, that a connection
99
+
can remain idle in a connection pool the server closes it.
100
+
| A value of ``0`` indicates that the client does not close idle
101
+
connections.
96
102
97
103
* - **maxStalenessSeconds**
98
104
- ``-1``, or any integer greater than or equal to ``90``
99
105
- ``-1``
100
-
- Specifies the maximum lag, in seconds, behind the primary node that a secondary node can be to be
101
-
considered for the given operation.
102
-
103
-
The value of this option must be at least ``90``, or the operation raises an error.
104
-
A value of ``-1`` means there is no maximum lag.
106
+
- | Specifies the maximum lag, in seconds, behind the primary node
107
+
that a secondary node can be to be considered for the given operation.
108
+
| The value of this option must be at least ``90``, or the
109
+
operation raises an error. A value of ``-1`` means there is no
110
+
maximum lag.
105
111
106
112
* - **maxPoolSize**
107
113
- Non-negative integer
108
114
- ``10``
109
-
- Specifies the maximum number of connections that the ``Client`` instance can create in a connection pool for a given server.
110
-
If you attempt an operation while the value of ``maxPoolSize`` connections are checked out,
111
-
the operation waits until an in-progress operation finishes and the connection returns to the pool.
115
+
- | Specifies the maximum number of connections that the ``Client``
116
+
instance can create in a connection pool for a given server.
117
+
| If you attempt an operation while the value of ``maxPoolSize``
118
+
connections are checked out, the operation waits until an
119
+
in-progress operation finishes and the connection returns to the pool.
112
120
113
121
* - **minPoolSize**
114
122
- Non-negative integer
115
123
- ``0``
116
-
- Specifies the minimum number of connections that are available in a server's connection pool at a given time.
117
-
If fewer than ``minPoolSize`` connections are in the pool,
118
-
the server adds connections in the background up to the value of ``minPoolSize``.
124
+
- | Specifies the minimum number of connections that are available in
125
+
a server's connection pool at a given time.
126
+
| If fewer than ``minPoolSize`` connections are in the pool,
127
+
the server adds connections in the background up to the value of ``minPoolSize``.
119
128
120
129
* - **readConcernLevel**
121
130
- String
@@ -134,7 +143,8 @@ string URI to specify the behavior of the client. To learn more about connection
134
143
- None
135
144
- Specifies which replica set members are considered for operations.
136
145
Each instance of this key is a separate tag set.
137
-
The driver checks each tag set until it finds one or more servers with each tag in the set.
146
+
The driver checks each tag set until it finds one or more servers
147
+
with each tag in the set.
138
148
139
149
* - **replicaSet**
140
150
- String
@@ -149,7 +159,9 @@ string URI to specify the behavior of the client. To learn more about connection
149
159
* - **serverSelectionTimeoutMS**
150
160
- Non-negative integer
151
161
- ``30000`` (30 seconds)
152
-
- Specifies the amount of time, in milliseconds, that the ``Client`` instance waits when attempting to select a server for an operation before timing out.
162
+
- Specifies the amount of time, in milliseconds, that the
163
+
``Client`` instance waits when attempting to select a server for an
164
+
operation before timing out.
153
165
154
166
* - **tls**
155
167
- Boolean
@@ -159,47 +171,62 @@ string URI to specify the behavior of the client. To learn more about connection
159
171
160
172
* - **tlsAllowInvalidCertificates**
161
173
- Boolean
162
-
- ``true``
163
-
- Specifies whether the ``Client`` instance returns an error if the server presents an invalid certificate.
164
-
We recommend that you set this option to ``true`` only in testing environments to avoid creating vulnerabilities in your application.
174
+
- ``false``
175
+
- | Specifies whether the ``Client`` instance returns an error if the
176
+
server presents an invalid certificate.
177
+
| We recommend that you set this option to ``true`` only in
178
+
testing environments to avoid creating vulnerabilities in your
179
+
application.
165
180
166
181
* - **tlsCAFile**
167
182
- String
168
183
- See description
169
-
- Specifies the path to the certificate authority (CA) file that the ``Client`` instance uses for TLS.
170
-
If you do not specify this option, the driver uses the Mozilla root certificates from the ``webpki-roots`` crate.
184
+
- | Specifies the path to the certificate authority (CA) file that
185
+
the ``Client`` instance uses for TLS.
186
+
| If you do not specify this option, the driver uses the Mozilla
187
+
root certificates from the ``webpki-roots`` crate.
171
188
172
189
* - **tlsCertificateKeyFile**
173
190
- String
174
191
- None
175
-
- Specifies the path to the certificate file that the ``Client`` instance presents to the server to verify its identify.
176
-
If you do not set this option, the ``Client`` instance does not attempt to verify its identity to the server.
192
+
- | Specifies the path to the certificate file that the ``Client``
193
+
instance presents to the server to verify its identify.
194
+
| If you do not set this option, the ``Client`` instance does not
195
+
attempt to verify its identity to the server.
177
196
178
197
* - **tlsInsecure**
179
198
- Boolean
180
-
- ``true``
181
-
- Specifies whether the ``Client`` instance returns an error if the server presents an invalid certificate.
182
-
We recommend that you set this option to ``true`` only in testing environments to avoid creating vulnerabilities in your application.
199
+
- ``false``
200
+
- | Specifies whether the ``Client`` instance returns an error if the
201
+
server presents an invalid certificate.
202
+
| We recommend that you set this option to ``true`` only in
203
+
testing environments to avoid creating vulnerabilities in your
204
+
application.
183
205
184
206
* - **w**
185
207
- Non-negative integer or string
186
208
- None
187
-
- Requests acknowledgment that the operation has propagated to a specific number or variety of servers.
188
-
To learn more, see :manual:`Write Concern </reference/write-concern>` in the Server manual.
209
+
- | Requests acknowledgment that the operation has propagated to a
210
+
specific number or variety of servers.
211
+
| To learn more, see :manual:`Write Concern
212
+
</reference/write-concern>` in the Server manual.
189
213
190
214
* - **wTimeoutMS**
191
215
- Non-negative integer
192
216
- No timeout
193
217
- Specifies a time limit, in milliseconds, for the write concern.
194
-
If an operation has not propagated to the requested level within the time limit, the driver raises an error.
218
+
If an operation has not propagated to the requested level within
219
+
the time limit, the driver raises an error.
195
220
196
221
* - **zlibCompressionLevel**
197
222
- Integer between -1 and 9 (inclusive)
198
223
- ``-1``
199
-
- Specifies the level field of the ``zlib`` compression if you use that compressor.
200
-
Setting a value of``-1`` selects the default compression level (``6``).
201
-
Setting a value of ``0`` specifies no compression, and setting a value of ``9`` specifies maximum
202
-
compression.
203
-
To learn more about network compression, see the :ref:`rust-network-compression` guide.
204
-
205
-
For a full list of options, see the `ClientOptions API documentation <{+api+}/options/struct.ClientOptions.html>`__.
224
+
- | Specifies the level field of the ``zlib`` compression if you use that compressor.
225
+
| Setting a value of``-1`` selects the default compression level (``6``).
226
+
| Setting a value of ``0`` specifies no compression, and setting
227
+
a value of ``9`` specifies maximum compression.
228
+
| To learn more about network compression, see the :ref:`rust-network-compression` guide.
229
+
230
+
To see a full list of connection options, visit the :manual:`Connection String
231
+
Options section </reference/connection-string/#connection-string-options>` of the
0 commit comments