MONGOC_OIDC_C...MS_GET_TIMEOUT(3)

πŸ“¦
version 2.5.6 Β· 3 versions
, in epel 10

πŸ’… MONGOC_OIDC_CALLBACK_PARAMS_GET_TIMEOUT β€” the libmongoc glow-up πŸŽ€

okay so bestie, you're in the libmongoc manual, and this page is all about one little function that tells your OIDC callback when it's time to panic (respectfully). it's giving "clock check but make it a pointer". let's get into it ✨


✨ SYNOPSIS ✨

const int64_t *
mongoc_oidc_callback_params_get_timeout (const mongoc_oidc_callback_params_t *params);

So like, the whole point of this icon: it returns a value you can compare against the System Clock to figure out when a timeout must occur. πŸ•°οΈ

the way that this is an ABSOLUTE time point, not a duration β€” yes, that matters, do not come for me. it's a when, not a how long. πŸ’€

Your callback can signal a timeout error using mongoc_oidc_callback_params_cancel_with_timeout(). here's the whole vibe in code:

mongoc_oidc_credential_t *
example_callback_fn (mongoc_oidc_callback_params_t *params) {
   const int64_t *timeout = mongoc_oidc_callback_params_get_timeout (params);

   // NULL means "infinite" timeout.
   if (timeout && bson_get_monotonic_time () > *timeout) {
      return mongoc_oidc_callback_params_cancel_with_timeout (params);
   }

   // ... your code here ...
}

and the key lore πŸ—οΈ: a NULL (unset) return value means "infinite" timeout. literally no deadline, main character energy, go off. 🌈


🫢 PARAMETERS 🫢

  • params: a mongoc_oidc_callback_params_t. that's it, that's the whole input. πŸ’–

πŸŽ€ RETURNS πŸŽ€

A value comparable with System Clock, or NULL. ⭐ (and remember, NULL = infinite, iykyk)


πŸ¦‹ LIFECYCLE πŸ¦‹

⚠️ okay this part is important, do NOT skip it: the pointed-to int64_t is only valid for the duration of the invocation of the OIDC callback function. so like, don't stash that pointer and take it home. it expires faster than a Snapchat streak. 😭

πŸ‘‘ SEE ALSO πŸ‘‘

  • mongoc_oidc_callback_params_t
  • mongoc_oidc_callback_t
  • mongoc_oidc_callback_params_cancel_with_timeout()

πŸ’œ AUTHOR πŸ’œ

MongoDB, Inc β€” icons only, no cap. πŸ‘‘

2009-present, MongoDB, Inc.


and that's the page, bestie!! πŸ“ frosted with love by libmongoc version 2.5.6, dated Oct 09, 2026 β€” see you in the next manpage, mwah πŸ’…βœ¨πŸ§šβ€β™€οΈ

πŸ“¦ where this page comes from