10#ifndef PCMK__CRM_CLUSTER__H
11# define PCMK__CRM_CLUSTER__H
15# include <libxml/tree.h>
24# include <corosync/cpg.h>
45#define CRM_NODE_LOST "lost"
49#define CRM_NODE_MEMBER "member"
153 struct cpg_name group;
162 cpg_handle_t cpg_handle;
242static inline const char *
253 default:
return "invalid";
257#if !defined(PCMK_ALLOW_DEPRECATED) || (PCMK_ALLOW_DEPRECATED == 1)
void pcmk_cluster_free(pcmk_cluster_t *cluster)
Free a pcmk_cluster_t object and its dynamically allocated members.
pcmk_cluster_t * pcmk_cluster_new(void)
Allocate a new pcmk_cluster_t object.
GHashTable * crm_peer_cache
int pcmk_cluster_connect(pcmk_cluster_t *cluster)
@ crm_join_nack_quiet
Not allowed to join, but don't send a nack message.
GHashTable * crm_remote_peer_cache
int pcmk_cluster_set_destroy_fn(pcmk_cluster_t *cluster, void(*fn)(gpointer))
Set the destroy function for a cluster object.
int pcmk_cluster_disconnect(pcmk_cluster_t *cluster)
Disconnect from the cluster layer.
struct crm_peer_node_s crm_node_t
const char * pcmk_cluster_layer_text(enum pcmk_cluster_layer layer)
Get a log-friendly string equivalent of a cluster layer.
unsigned long long crm_peer_seq
enum pcmk_cluster_layer pcmk_get_cluster_layer(void)
Get and validate the local cluster layer.
pcmk_cluster_layer
Types of cluster layer.
@ pcmk_cluster_layer_invalid
Invalid cluster layer.
@ pcmk_cluster_layer_corosync
Corosync Cluster Engine.
@ pcmk_cluster_layer_unknown
Unknown cluster layer.
Deprecated Pacemaker cluster API.
int pcmk_cpg_set_deliver_fn(pcmk_cluster_t *cluster, cpg_deliver_fn_t fn)
Set the CPG deliver callback function for a cluster object.
int pcmk_cpg_set_confchg_fn(pcmk_cluster_t *cluster, cpg_confchg_fn_t fn)
Set the CPG config change callback function for a cluster object.
void(* destroy)(gpointer)
Wrappers for and extensions to libxml2.