MONGOC_SERVER_...PTION_ISMASTER(3)

okay so this is the libmongoc manual page for MONGOC_SERVER_...PTION_ISMASTER(3), and bestie, it's giving deprecated era πŸ’€. Like, the function is still here, but it's not the main character anymore. No cap.


⚠️ WARNING ⚠️

Deprecated since version 1.18.0: Use mongoc_server_description_hello_response() instead. That's the glow-up, periodt. This one? It's lowkey retired. πŸ’…

πŸ“œ SYNOPSIS πŸ“œ

const bson_t *
mongoc_server_description_ismaster (
   const mongoc_server_description_t *description);

πŸŽ€ PARAMETERS πŸŽ€

  • description β€” a mongoc_server_description_t. That's it, that's the whole vibe. 🫢

πŸ’– DESCRIPTION πŸ’–

The client or client pool periodically runs a "hello" command on each server, to update its view of the MongoDB deployment. It's like a vibe check but for your MongoDB cluster, fr fr. ✨

Use mongoc_client_get_server_descriptions() and mongoc_server_description_hello_response() to get the most recent "hello" response. Those are the besties you actually want. πŸ‘‘


πŸ”₯ RETURNS πŸ”₯

A reference to a BSON document, owned by the server description. The document is empty if the driver is not connected to the server. So if it's empty, that's not a glitch, bestie β€” the driver is just not connected. 😭


πŸ‘‘ AUTHOR πŸ‘‘

MongoDB, Inc. Slay. πŸ’œ


2009-present, MongoDB, Inc. Iconic behavior, honestly. πŸŽ€


sign-off: this page is from version 1.30.13, dated Oct 09, 2024. Bye bestie, go use mongoc_server_description_hello_response() instead! πŸ’–βœ¨

πŸ“¦ where this page comes from