MONGOC_APM_SER...EEDED_GET_HOST(3)

πŸŽ€ MONGOC_APM_SER...EEDED_GET_HOST(3) πŸŽ€

okay bestie, this is a libmongoc manual page, and yes the title is giving mysterious truncated energy πŸ’… but the actual function is right below in the synopsis. it's an APM helper for a server heartbeat succeeded event, and it's lowkey iconic in a very specific way.


✨ SYNOPSIS ✨

const mongoc_host_list_t *
mongoc_apm_server_heartbeat_succeeded_get_host (
   const mongoc_apm_server_heartbeat_succeeded_t *event);

So this function returns this event's host. The mongoc_host_list_t it hands you is not part of a linked list β€” it is solely the server for this event. no cap. 🫢

⚠️ scope check: the data is only valid in the scope of the callback that receives this event. if it will be accessed after the callback returns, copy it. literally copy it, bestie 😭

🌸 PARAMETERS 🌸

  • event β€” a mongoc_apm_server_heartbeat_succeeded_t. that's the event, and that's the whole parameter list. slay. πŸ’–

πŸ’– RETURNS πŸ’–

A mongoc_host_list_t that should not be modified or freed. like, admire it, use it in callback scope, but do not modify it and do not free it. periodt. 🫢


πŸ¦‹ SEE ALSO πŸ¦‹

  • Introduction to Application Performance Monitoring β€” that's the reference from the original, iykyk. πŸ”₯

πŸ‘‘ AUTHOR πŸ‘‘

MongoDB, Inc


2009-present, MongoDB, Inc.


xoxo, this was version 2.5.6, dated Oct 09, 202 β€” libmongoc bestie signing off πŸ’œβœ¨πŸŽ€

πŸ“¦ where this page comes from