root/lib/cluster/crmcluster_private.h

/* [previous][next][first][last][top][bottom][index][help] */

INCLUDED FROM


   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
  46 bool pcmk__corosync_has_nodelist(void);
  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
  56 int pcmk__corosync_connect(pcmk_cluster_t *cluster);
  57 
  58 G_GNUC_INTERNAL
  59 void pcmk__corosync_disconnect(pcmk_cluster_t *cluster);
  60 
  61 G_GNUC_INTERNAL
  62 bool pcmk__corosync_is_peer_active(const pcmk__node_status_t *node);
  63 
  64 G_GNUC_INTERNAL
  65 int pcmk__cpg_connect(pcmk_cluster_t *cluster);
  66 
  67 G_GNUC_INTERNAL
  68 void pcmk__cpg_disconnect(pcmk_cluster_t *cluster);
  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

/* [previous][next][first][last][top][bottom][index][help] */