MONGOC_APM_SET...OGY_CHANGED_CB(3)

Hey bestie πŸ’– you just opened the MONGOC_APM_SET...OGY_CHANGED_CB(3) manual page from libmongoc. This is the one where you set the callback that gets pinged when the server topology does something. It’s giving monitoring main character energy, no cap. πŸ‘‘

✨ SYNOPSIS ✨

typedef void (*mongoc_apm_topology_changed_cb_t) (
   const mongoc_apm_topology_changed_t *event);

void
mongoc_apm_set_topology_changed_cb (mongoc_apm_callbacks_t *callbacks,
                                    mongoc_apm_topology_changed_cb_t cb);

Okay so what does it actually do? You receive an event notification whenever the driver observes a change in any of the servers it is connected to or a change in the overall server topology. That’s the whole vibe: topology watch, but make it callback. πŸ‘€βœ¨

πŸŽ€ PARAMETERS πŸŽ€

  • callbacks β€” a mongoc_apm_callbacks_t. That’s the callbacks object you’re working with, bestie.
  • cb β€” a function to call with a mongoc_apm_topology_changed_t whenever the driver observes a change in any of the servers it is connected to or a change in the overall server topology. Yes, it’s the star of the show. 🌟

πŸ¦‹ SEE ALSO πŸ¦‹

  • Introduction to Application Performance Monitoring β€” go read that for the bigger APM lore πŸ’œ

πŸ’œ AUTHOR πŸ’œ

MongoDB, Inc

2009-present, MongoDB, Inc.


Okay bye bestie 🫢 this was libmongoc version 2.5.6, dated Oct 09, 202 (the footer text runs right into the title, classic 😭). Stay slay, and may your topology changes always be notified. πŸ’…πŸ”₯

πŸ“¦ where this page comes from