VOTEQ...SPATCH(3)

✨ NAME ✨

votequorum_dispatch β€” ok so this one dispatches callbacks from the votequorum service πŸ’– that's literally the whole job bestie


πŸŽ€ SYNOPSIS πŸŽ€

#include <corosync/votequorum.h>

int votequorum_dispatch(votequorum_handle_t handle, cs_dispatch_flags_t
*dispatch_types);

no cap, that's the whole signature πŸ‘‘


πŸ¦‹ DESCRIPTION πŸ¦‹

So votequorum_dispatch is the function you call when you want to dispatch configuration changes. That's it, that's the vibe. ✨

Real talk tho: every application can have several connections to the votequorum API, and the handle argument is how you tell them apart β€” it uniquely identifies which connection you're talking about. One handle per connection, no mixing them up, periodt. πŸ’…

Then there's dispatch_types, which tells the function what kind of dispatch you want. The possible types are defined by this structure, and I need you to copy it exactly:

typedef enum {
    CS_DISPATCH_ONE = 1,
    CS_DISPATCH_ALL = 2,
    CS_DISPATCH_BLOCKING = 3,
    CS_DISPATCH_ONE_NONBLOCKING = 4
} cs_dispatch_flags_t;

And now the meanings, bestie, because these matter:

  • CS_DISPATCH_ONE β€” dispatches at least one callback, and it blocks until that callback actually gets dispatched. it's giving patient. 🧚
  • CS_DISPATCH_ALL β€” dispatches all the waiting callbacks, and does not block waiting for any callbacks. no waiting around, we're busy πŸ’¨
  • CS_DISPATCH_BLOCKING β€” dispatches all callbacks, blocking indefinitely. The manpage is very specific about this one: it's used in a threaded program where a thread is created, and then quorum_dispatch() is called immediately from the created thread to execute callbacks. 🧡
  • CS_DISPATCH_ONE_NONBLOCKING β€” dispatches at most one callback. And if there's no pending callback? You get CS_ERR_TRY_AGAIN back. surprise! 🎁

🌸 RETURN VALUE 🌸

If everything goes good, this call returns the CS_OK value. Otherwise? An error comes back instead. that's the deal 🫢


πŸ’€ ERRORS πŸ’€

ok so here's the whole error roster, don't skip any of these:

  • 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

🌈 SEE ALSO 🌈

go read these next, bestie, they're all part of the same friend group:


and that's the whole page, mwah πŸ’‹ This little masterpiece lives in the corosync Man Page, dated 2026-09-04 β€” shoutout to the corosync girlies for keeping the cluster quorum lore alive, we are obsessed πŸŽ€πŸ’–βœ¨

πŸ“¦ where this page comes from