MONGOC_TOPOLOG...SCRIPTION_TYPE(3)

πŸ’… MONGOC_TOPOLOG...SCRIPTION_TYPE(3) πŸ’…

ok so real talk β€” this one lives in the libmongoc manual, and the title got cropped by the terminal like a bad selfie. it's mongoc_topology_description_type, bestie. say it with me. 🫢


✨ SYNOPSIS ✨

const char *
mongoc_topology_description_type (const mongoc_topology_description_t *td);

that's it. that's the whole vibe. one function, takes one thing, gives you back a const char *. iconic behavior honestly. πŸ‘‘


πŸŽ€ PARAMETERS πŸŽ€

  • td β€” a mongoc_topology_description_t. that's the whole parameter list, she's low maintenance. literally just hand her the topology description struct and step back. πŸ’–

🌸 DESCRIPTION 🌸

okay so here's what she does: you give her a td, and she hands you back a string. that string is one of the topology types defined in the Server Discovery And Monitoring Spec β€” like, the official list, no cap. πŸ“‹

here's the full set of possible returns, no skipping, all six of them:

  • Unknown
  • Single
  • Sharded
  • ReplicaSetNoPrimary
  • ReplicaSetWithPrimary
  • LoadBalanced

that's the roster. those are the strings, character for character, so don't go freestyling with your own capitalization β€” the spec said what it said. πŸ’…βœ¨


πŸ‘‘ AUTHOR πŸ‘‘

MongoDB, Inc β€” yes, the whole company. slay. πŸ’πŸ’–


2009-present, MongoDB, Inc. β€” they've been at this since 2009, main character energy fr fr. 😭πŸ”₯


okay and the cute sign-off: this lil beauty is from libmongoc version 2.5.6, dated Oct 09 β€” and yeah the terminal ate the last digits of the year and the manual name on the footer too, so if you need the exact year go check the original page bestie, not me. πŸŽ€ bye, go read your topology types, ily! πŸŒˆπŸ’œ

β€” fin β€”

πŸ“¦ where this page comes from