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

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