CPG_C...XT_GET(3)

πŸ’– CPG_CONTEXT_GET πŸ’–

okay bestie, welcome to the cpg_context_get(3) page from the Corosync Cluster Engine Programmer's Manual ✨ no cap, this one's a shortie but she's important.


🌸 NAME 🌸

cpg_context_get β€” gets the context variable for a CPG instance πŸŽ€


✨ SYNOPSIS ✨

#include <corosync/cpg.h>

int cpg_context_get(cpg_handle_t handle, void **context);

like. that's it. that's the whole vibe. πŸ¦‹


πŸ’… DESCRIPTION πŸ’…

so cpg_context_get does the thing where it retrieves the context variable that you previously stashed away using cpg_context_set(3). it's giving "hey remember that thing i gave you? give it back bestie" πŸ’–

that's literally the whole function. she's simple, she's reliable, she's the friend who always remembers where you left your keys πŸ”₯


πŸ‘‘ RETURN VALUE πŸ‘‘

this call returns the CS_OK value if it worked, otherwise an error comes back at you 😭 like she tried her best but the universe said no.


πŸ’€ ERRORS πŸ’€

ngl, the errors are undocumented. periodt. we don't know. nobody wrote them down. it's giving mystery ✨


🫢 SEE ALSO 🫢

go read these too, they're the whole friend group 🌈:

and here's the error-code lore, lowkey iconic list incoming 🧚:

  • CS_ERR_TRY_AGAIN β€” Resource temporarily unavailable
  • CS_ERR_INVALID_PARAM β€” Invalid argument
  • CS_ERR_ACCESS β€” Permission denied
  • CS_ERR_LIBRARY β€” The connection failed
  • CS_ERR_INTERRUPT β€” System call interrupted by a signal
  • CS_ERR_NOT_SUPPORTED β€” The requested protocol/functionality not supported
  • CS_ERR_MESSAGE_ERROR β€” Incorrect auth message received
  • CS_ERR_NO_MEMORY β€” Not enough memory to complete the requested task

πŸ’‘ reminder bestie: every option, value, default and error code above is straight from the original page β€” i kept all of it, i just gave it a glow-up πŸ’…

that's the whole page!! you ate that. go forth and get your context back πŸŽ€βœ¨

corosync Man Page Β· 2004-08-31 Β· CPG_C...XT_GET(3) β€” mwah, love u, bye πŸ’–πŸ¦‹πŸŒΈ

πŸ“¦ where this page comes from