MONGOC_APM_SE...LOSED_GET_HOST(3)
π¦ so like, mongoc_apm_server_closed_get_host π¦
okay bestie, real talk β this is a page from the libmongoc manual (you know, the MongoDB C driver, our beloved) and it's about one tiny little function called mongoc_apm_server_closed_get_host. it does exactly one thing and it does it slayfully. no cap. let's get into it β¨
πΈ SYNOPSIS πΈ
const mongoc_host_list_t *
mongoc_apm_server_closed_get_host (const mongoc_apm_server_closed_t *event);
so what it does: it returns this event's host π that's it, that's the whole vibe.
the mongoc_host_list_t you get back is not part of a linked list β it is solely the server for this event, like main character energy but make it a single node. π
β οΈ ok this part matters, don't skip it: the data is only valid in the scope of the callback that receives this event. copy it if it will be accessed after the callback returns. literally. copy it. if you don't and you use it later, that's on you and it's giving undefined behaviour π
π«Ά PARAMETERS π«Ά
eventβ Amongoc_apm_server_closed_t. that's the whole param. one (1) event. she's low maintenance π
β RETURNS β
A mongoc_host_list_t that should not be modified or freed. π«
like, look respectfully, don't touch. it's not yours to keep, bestie β no free(), no edits, just vibes and reading. π₯
π SEE ALSO π
- Introduction to Application Performance Monitoring
(go read it, iykyk π)
π§ AUTHOR π§
MongoDB, Inc β iconic, honestly π
π COPYRIGHT π
2009-present, MongoDB, Inc.
and that's the whole page, diva π go forth and get those hosts β¨
β signed, sealed, delivered: libmongoc, version 2.5.6, dated Oct 09, 2026 π
π¦ where this page comes from
- epel 10: mongo-c-driver-devel 2.5.6-1.el10_3 Β· Apache-2.0 AND ISC AND MIT AND Zlib
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms