1MONGOC_TOPOLOGY_DESCRIPTION_HMAOSN_GWORCI_TlTAiOBbPLmOEoL_nOSgGEoYRc_VDEERS(C3R)IPTION_HAS_WRITABLE_SERVER(3)
2
3
4
6 mongoc_topology_description_has_writable_server - mongoc_topology_de‐
7 scription_has_writable_server()
8
10 bool
11 mongoc_topology_description_has_writable_server (
12 const mongoc_topology_description_t *td);
13
14 Determines if the topology has a writable server available, such as a
15 primary, mongos, or standalone. This function uses the driver's current
16 knowledge of the state of the MongoDB server or servers it is connected
17 to; it does no I/O and it does not block.
18
19 Use this function in a topology-changed callback registered with mon‐
20 goc_apm_set_topology_changed_cb. For historical reasons, the mon‐
21 goc_topology_description_t passed to the callback is a const pointer,
22 you must cast away const to pass the pointer to mongoc_topology_de‐
23 scription_has_writable_server.
24
26 • td: A mongoc_topology_description_t.
27
29 True if there is a known writable server.
30
31 SEE ALSO:
32 Introduction to Application Performance Monitoring
33
34
36 MongoDB, Inc
37
39 2017-present, MongoDB, Inc
40
41
42
43
441.20.0 MONGONCo_vTO1P8O,LO2G0Y2_1DESCRIPTION_HAS_WRITABLE_SERVER(3)