pacemaker  3.0.0-d8340737c4
Scalable High-Availability cluster resource manager
crmcluster_private.h
Go to the documentation of this file.
1 /*
2  * Copyright 2020-2024 the Pacemaker project contributors
3  *
4  * The version control history for this file may have further details.
5  *
6  * This source code is licensed under the GNU Lesser General Public License
7  * version 2.1 or later (LGPLv2.1+) WITHOUT ANY WARRANTY.
8  */
9 
10 #ifndef PCMK__CLUSTER_CRMCLUSTER_PRIVATE__H
11 #define PCMK__CLUSTER_CRMCLUSTER_PRIVATE__H
12 
13 /* This header is for the sole use of libcrmcluster, so that functions can be
14  * declared with G_GNUC_INTERNAL for efficiency.
15  */
16 
17 #include <stdbool.h> // bool
18 #include <stdint.h> // uint32_t, uint64_t
19 
20 #include <glib.h> // G_GNUC_INTERNAL, gboolean
21 #include <libxml/tree.h> // xmlNode
22 
23 #if SUPPORT_COROSYNC
24 #include <corosync/cpg.h> // cpg_handle_t
25 #endif // SUPPORT_COROSYNC
26 
27 #include <crm/cluster.h> // pcmk_cluster_t
28 #include <crm/cluster/internal.h> // pcmk__node_status_t
29 
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33 
34 G_GNUC_INTERNAL
35 void pcmk__cluster_set_quorum(bool quorate);
36 
37 G_GNUC_INTERNAL
38 void election_fini(pcmk_cluster_t *cluster);
39 
40 #if SUPPORT_COROSYNC
41 
42 G_GNUC_INTERNAL
43 bool pcmk__corosync_is_active(void);
44 
45 G_GNUC_INTERNAL
47 
48 G_GNUC_INTERNAL
49 char *pcmk__corosync_uuid(const pcmk__node_status_t *peer);
50 
51 G_GNUC_INTERNAL
52 char *pcmk__corosync_name(uint64_t /*cmap_handle_t */ cmap_handle,
53  uint32_t nodeid);
54 
55 G_GNUC_INTERNAL
57 
58 G_GNUC_INTERNAL
60 
61 G_GNUC_INTERNAL
63 
64 G_GNUC_INTERNAL
65 int pcmk__cpg_connect(pcmk_cluster_t *cluster);
66 
67 G_GNUC_INTERNAL
69 
70 G_GNUC_INTERNAL
71 uint32_t pcmk__cpg_local_nodeid(cpg_handle_t handle);
72 
73 G_GNUC_INTERNAL
74 bool pcmk__cpg_send_xml(const xmlNode *msg, const pcmk__node_status_t *node,
75  enum pcmk_ipc_server dest);
76 
77 #endif // SUPPORT_COROSYNC
78 
79 #ifdef __cplusplus
80 }
81 #endif
82 
83 #endif // PCMK__CLUSTER_CRMCLUSTER_PRIVATE__H
uint32_t pcmk__cpg_local_nodeid(cpg_handle_t handle)
Definition: cpg.c:106
char * pcmk__corosync_name(uint64_t cmap_handle, uint32_t nodeid)
Definition: corosync.c:101
bool pcmk__cpg_send_xml(const xmlNode *msg, const pcmk__node_status_t *node, enum pcmk_ipc_server dest)
Definition: cpg.c:1042
int pcmk__cpg_connect(pcmk_cluster_t *cluster)
Connect to Corosync CPG.
Definition: cpg.c:781
G_GNUC_INTERNAL void pcmk__cluster_set_quorum(bool quorate)
Definition: membership.c:108
G_GNUC_INTERNAL void election_fini(pcmk_cluster_t *cluster)
Definition: election.c:156
pcmk_ipc_server
Available IPC interfaces.
Definition: ipc.h:48
int pcmk__corosync_connect(pcmk_cluster_t *cluster)
Definition: corosync.c:459
char * pcmk__corosync_uuid(const pcmk__node_status_t *node)
Definition: corosync.c:53
bool pcmk__corosync_is_peer_active(const pcmk__node_status_t *node)
Definition: corosync.c:530
void pcmk__cpg_disconnect(pcmk_cluster_t *cluster)
Definition: cpg.c:890
bool pcmk__corosync_has_nodelist(void)
Definition: corosync.c:732
bool pcmk__corosync_is_active(void)
Definition: corosync.c:506
Node status data (may be a cluster node or a Pacemaker Remote node)
Definition: internal.h:112
void pcmk__corosync_disconnect(pcmk_cluster_t *cluster)
Definition: corosync.c:223