root/daemons/controld/controld_membership.h

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

INCLUDED FROM


DEFINITIONS

This source file includes following definitions.
  1. controld_get_join_phase

   1 /*
   2  * Copyright 2012-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 #ifndef MEMBERSHIP__H
  10 #  define MEMBERSHIP__H
  11 
  12 #ifdef __cplusplus
  13 extern "C" {
  14 #endif
  15 
  16 #include <crm/cluster/internal.h>
  17 
  18 /*!
  19  * \internal
  20  * \enum controld_join_phase
  21  * \brief Phases that a node may pass through while joining controller group
  22  */
  23 enum controld_join_phase {
  24     controld_join_nack,
  25     controld_join_none,
  26     controld_join_welcomed,
  27     controld_join_integrated,
  28     controld_join_finalized,
  29     controld_join_confirmed,
  30 };
  31 
  32 //! User data for \c pcmk__node_status_t object
  33 struct controld_node_status_data {
  34     enum controld_join_phase join_phase;
  35 };
  36 
  37 /*!
  38  * \internal
  39  * \brief Get the controller group join phase from a node status object
  40  *
  41  * \param[in] node  Node status object
  42  *
  43  * \return Controller group join phase
  44  */
  45 static inline enum controld_join_phase
  46 controld_get_join_phase(const pcmk__node_status_t *node)
     /* [previous][next][first][last][top][bottom][index][help] */
  47 {
  48     if ((node != NULL) && (node->user_data != NULL)) {
  49         struct controld_node_status_data *data = node->user_data;
  50 
  51         return data->join_phase;
  52     }
  53     return controld_join_none;
  54 }
  55 
  56 void post_cache_update(int instance);
  57 
  58 extern gboolean check_join_state(enum crmd_fsa_state cur_state, const char *source);
  59 
  60 void controld_destroy_failed_sync_table(void);
  61 void controld_remove_failed_sync_node(const char *node_name);
  62 
  63 #ifdef __cplusplus
  64 }
  65 #endif
  66 
  67 #endif

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