Skip to content

Commit ecf1777

Browse files
lindseymoorerachel-mack
authored andcommitted
DOCSP-47019 Shift Go ToC (#499)
* DOCSP-47019 Shift Go ToC * generate staging * SA review * connection options drawer * fi crud refs
1 parent 36d65a4 commit ecf1777

File tree

10 files changed

+171
-6
lines changed

10 files changed

+171
-6
lines changed

source/connect.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,4 @@ sections:
4242
- :ref:`golang-connection-troubleshooting`
4343

4444
For more information about authenticating with a MongoDB instance, see the
45-
:ref:`golang-authentication` section.
45+
:ref:`golang-authentication` section.

source/connect/connection-options.txt

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
==================
2+
Connection Options
3+
==================
4+
5+
.. toctree::
6+
:titlesonly:
7+
:maxdepth: 1
8+
9+
Specify Connection Options </connection-options/specify-connection-options>
10+
Compress Network Traffic </connection-options/network-compression>
11+
Customize Server Selection </connection-options/server-selection>
12+
Stable API </connection-options/stable-api>
13+
Limit Server Execution Time </connection-options/csot>
14+
Connection Pools </connection-options/connection-pools>

source/connect/connection-options/connection-pools.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,4 +242,4 @@ guide, see the following API documentation:
242242

243243
- `Client <{+api+}/mongo#Client>`__
244244
- `ClientOptions <{+api+}/mongo/options#ClientOptions>`__
245-
- `Client.Diconnect() <{+api+}/mongo#Client.Disconnect>`__
245+
- `Client.Diconnect() <{+api+}/mongo#Client.Disconnect>`__
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.. TODO
Lines changed: 131 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
1+
.. _golang-connection-options:
2+
3+
==========================
4+
Specify Connection Options
5+
==========================
6+
7+
.. facet::
8+
:name: genre
9+
:values: reference
10+
11+
.. meta::
12+
:keywords: code example, timeout, customize connection
13+
14+
.. contents:: On this page
15+
:local:
16+
:backlinks: none
17+
:depth: 2
18+
:class: singlecol
19+
20+
.. toctree::
21+
:titlesonly:
22+
:maxdepth: 1
23+
24+
Specify Connection Options <connect/connection-options/specify-connection-options>
25+
Compress Network Traffic <connect/connection-options/network-compression>
26+
Customize Cluster Settings <connect/connection-options/cluster-settings>
27+
Stable API <connect/connection-options/stable-api>
28+
Limit Server Execution Time <connect/connection-options/csot>
29+
Connection Pools <connect/connection-options/connection-pools>
30+
31+
Overview
32+
--------
33+
34+
This guide explains several common MongoDB connection and authentication
35+
options. You can pass the connection options as parameters in the connection
36+
URI to specify the behavior of the client.
37+
38+
Options
39+
-------
40+
41+
The following table describes the connection options that you can set in
42+
your connection URI. Each entry provides the option name, value type,
43+
default value, and a description of the option.
44+
45+
.. list-table::
46+
:header-rows: 1
47+
:widths: 34 10 12 44
48+
49+
* - Option Name
50+
- Type
51+
- Default Value
52+
- Description
53+
54+
* - **timeoutMS**
55+
- integer
56+
- ``null``
57+
- Specifies the number of milliseconds that a single operation run on the
58+
``Client`` can take before returning a timeout error. Operations honor
59+
this setting only if there is no deadline on the operation
60+
Context. To learn more about this option, see the :ref:`CSOT
61+
<golang-csot>` guide.
62+
63+
* - **connectTimeoutMS**
64+
- integer
65+
- ``30000``
66+
- Specifies the time in milliseconds to attempt a connection before
67+
timing out.
68+
69+
* - **maxPoolSize**
70+
- integer
71+
- ``100``
72+
- Specifies the maximum number of connections that a connection pool may
73+
have at a given time.
74+
75+
* - **replicaSet**
76+
- string
77+
- ``null``
78+
- Specifies the replica set name for the cluster. All nodes in the
79+
replica set must have the same replica set name, or the Client will not
80+
consider them as part of the set.
81+
82+
* - **maxIdleTimeMS**
83+
- integer
84+
- ``0``
85+
- Specifies the maximum amount of time a connection can remain idle
86+
in the connection pool before being removed and closed. The
87+
default is ``0``, meaning a connection can remain unused
88+
indefinitely.
89+
90+
* - **minPoolSize**
91+
- integer
92+
- ``0``
93+
- Specifies the minimum number of connections that the driver maintains
94+
in a single connection pool.
95+
96+
* - **serverSelectionTimeoutMS**
97+
- integer
98+
- ``30000``
99+
- Specifies the number of milliseconds to wait to find an available,
100+
suitable server to execute an operation.
101+
102+
* - **heartbeatFrequencyMS**
103+
- integer
104+
- ``10000``
105+
- Specifies the number of milliseconds to wait between periodic
106+
background server checks.
107+
108+
* - **tls**
109+
- boolean
110+
- ``false``
111+
- Specifies whether to establish a Transport Layer Security (TLS)
112+
connection with the instance. This is automatically set to ``true``
113+
when using a DNS seedlist (SRV) in the connection string. You can
114+
override this behavior by setting the value to ``false``.
115+
116+
* - **w**
117+
- string or integer
118+
- ``null``
119+
- Specifies the write concern. To learn more about values, see the
120+
server documentation on
121+
:manual:`Write Concern options </reference/write-concern>`.
122+
123+
* - **directConnection**
124+
- boolean
125+
- ``false``
126+
- Specifies whether to force dispatch **all** operations to the host
127+
specified in the connection URI.
128+
129+
For a full list of connection options, see the `ClientOptions API
130+
documentation
131+
<{+api+}/mongo/options#ClientOptions>`__.

source/crud/configure.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -625,4 +625,4 @@ API Documentation:
625625
- `CreateOne() <{+api+}/mongo#IndexView.CreateOne>`__
626626
- `IndexOptions <{+api+}/mongo/options#IndexOptions>`__
627627
- `UpdateOneOptions <{+api+}/mongo/options#UpdateOneOptions>`__
628-
- `UpdateManyOptions <{+api+}/mongo/options#UpdateManyOptions>`__
628+
- `UpdateManyOptions <{+api+}/mongo/options#UpdateManyOptions>`__

source/crud/update/replace.txt

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,3 +166,22 @@ guide, see the following API Documentation:
166166

167167
- `ReplaceOne() <{+api+}/mongo#Collection.ReplaceOne>`__
168168
- `UpdateResult <{+api+}/mongo#UpdateResult>`__
169+
170+
=================
171+
Replace Documents
172+
=================
173+
174+
.. contents:: On this page
175+
:local:
176+
:backlinks: none
177+
:depth: 2
178+
:class: singlecol
179+
180+
.. facet::
181+
:name: genre
182+
:values: reference
183+
184+
.. meta::
185+
:keywords: code example, go, write, add data, change
186+
187+
.. TODO

source/databases-collections.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,4 +142,4 @@ following API documentation:
142142
- `Collection <{+api+}/mongo#Collection>`__
143143
- `CreateCollection() <{+api+}/mongo#Database.CreateCollection>`__
144144
- `ListCollections() <{+api+}/mongo#Database.ListCollections>`__
145-
- `Drop() <{+api+}/mongo#Database.Drop>`__
145+
- `Drop() <{+api+}/mongo#Database.Drop>`__

source/monitoring-and-logging/change-streams.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,4 +295,4 @@ documentation:
295295

296296
- `Watch() for collections <{+api+}/mongo#Collection.Watch>`__
297297
- `Watch() for databases <{+api+}/mongo#Database.Watch>`__
298-
- `Watch() for clients <{+api+}/mongo#Client.Watch>`__
298+
- `Watch() for clients <{+api+}/mongo#Client.Watch>`__

source/reference/upgrade.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,4 +103,4 @@ Version 2.0 Breaking Changes
103103
- Removal of the ``bson/primitive`` package. This package is now merged with
104104
the ``bson`` package. To update your code, remove any ``bson/primitive``
105105
import statements and change any instance of ``primitive.ObjectID`` to
106-
``bson.ObjectId``.
106+
``bson.ObjectId``.

0 commit comments

Comments
 (0)