pacemaker
1.1.18-7fdfbbe
Scalable High-Availability cluster resource manager
|
Functions for conducting elections. More...
Go to the source code of this file.
Typedefs | |
typedef struct election_s | election_t |
Enumerations | |
enum | election_result { election_start = 0, election_in_progress, election_lost, election_won, election_error } |
Functions | |
void | election_fini (election_t *e) |
void | election_reset (election_t *e) |
election_t * | election_init (const char *name, const char *uname, guint period_ms, GSourceFunc cb) |
void | election_timeout_set_period (election_t *e, guint period_ms) |
void | election_timeout_stop (election_t *e) |
void | election_vote (election_t *e) |
bool | election_check (election_t *e) |
void | election_remove (election_t *e, const char *uname) |
enum election_result | election_state (election_t *e) |
enum election_result | election_count_vote (election_t *e, xmlNode *vote, bool can_win) |
Functions for conducting elections.
Definition in file election.h.
typedef struct election_s election_t |
Definition at line 27 of file election.h.
enum election_result |
Enumerator | |
---|---|
election_start | |
election_in_progress | |
election_lost | |
election_won | |
election_error |
Definition at line 29 of file election.h.
bool election_check | ( | election_t * | e | ) |
Definition at line 250 of file election.c.
enum election_result election_count_vote | ( | election_t * | e, |
xmlNode * | vote, | ||
bool | can_win | ||
) |
Definition at line 304 of file election.c.
void election_fini | ( | election_t * | e | ) |
Definition at line 108 of file election.c.
election_t* election_init | ( | const char * | name, |
const char * | uname, | ||
guint | period_ms, | ||
GSourceFunc | cb | ||
) |
Definition at line 65 of file election.c.
void election_remove | ( | election_t * | e, |
const char * | uname | ||
) |
Definition at line 86 of file election.c.
void election_reset | ( | election_t * | e | ) |
Definition at line 94 of file election.c.
enum election_result election_state | ( | election_t * | e | ) |
Definition at line 56 of file election.c.
void election_timeout_set_period | ( | election_t * | e, |
guint | period_ms | ||
) |
Definition at line 137 of file election.c.
void election_timeout_stop | ( | election_t * | e | ) |
Definition at line 129 of file election.c.
void election_vote | ( | election_t * | e | ) |
Definition at line 208 of file election.c.