MONGOC_TOPOLOGY_DESCRIPTION_HAS_WRITABLE_SERVER(3) libmongoc MONGOC_TOPOLOGY_DESCRIPTION_HAS_WRITABLE_SERVER(3)

bool
mongoc_topology_description_has_writable_server (
   const mongoc_topology_description_t *td);


Determines if the topology has a writable server available, such as a primary, mongos, or standalone. This function uses the driver's current knowledge of the state of the MongoDB server or servers it is connected to; it does no I/O and it does not block.

td: A mongoc_topology_description_t.

True if there is a known writable server.

SEE ALSO:

Introduction to Application Performance Monitoring



MongoDB, Inc

2017-present, MongoDB, Inc

March 31, 2024 1.26.0