yumapro  23.10T-6
YumaPro SDK
Loading...
Searching...
No Matches
agt_yp_ha.h File Reference

YumaPro High Availability module (YP-HA) More...

#include <xmlstring.h>
#include "agt.h"
#include "agt_cfg.h"
#include "status_enum.h"
Include dependency graph for agt_yp_ha.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  yp_ha_server_t
 For each CLI-configured ha-server there will be one entry entry the active and standby both need this list; active server will reject register-request request from standby server if their server-id is not in the list. More...
 
struct  yp_ha_service_t
 YP-HA service instance. More...
 

Enumerations

enum  yp_ha_state_t {
  HA_STATE_NONE ,
  HA_STATE_DISABLED ,
  HA_STATE_ERROR ,
  HA_STATE_WAIT_ROLE ,
  HA_STATE_BE_ACTIVE ,
  HA_STATE_ACTIVE ,
  HA_STATE_BE_STANDBY ,
  HA_STATE_STANDBY ,
  HA_STATE_SHUTTING_DOWN
}
 YP-HA Shared State. More...
 

Functions

void agt_yp_ha_preinit (void)
 Pre-Initialize the YP-HA subsys handler. More...
 
status_t agt_yp_ha_init (void)
 Initialize the YP-HA subsys handler (begin phase 2 init) More...
 
status_t agt_yp_ha_init2 (void)
 Initialize the YP-HA shared state (phase 2 init, post external init). More...
 
void agt_yp_ha_cleanup (void)
 Cleanup the YP-HA Module. More...
 
status_t agt_yp_ha_add_server_cli (const xmlChar *valstr)
 Add an HA server entry from the –ha-server CLI parm. More...
 
boolean agt_yp_ha_mgmt_enabled (void)
 Check if MGMT protocols disabled because YP-HA Standby mode. More...
 
status_t agt_yp_ha_be_active (void)
 Put this server in YP-HA Active mode. More...
 
status_t agt_yp_ha_be_none (void)
 Put this server in WAIT_ROLE state. More...
 
status_t agt_yp_ha_be_standby (const xmlChar *new_server_id)
 Put this server in YP-HA Standby mode. More...
 
agt_ha_role_t agt_yp_ha_get_role (void)
 Get the YP-HA server role for this server. More...
 
const xmlChar * agt_yp_ha_get_role_state (const xmlChar **tstamp)
 Get the YP-HA server role for this server as a string. More...
 
yp_ha_service_tagt_yp_ha_get_service_cb (void)
 Get the YP-HA service control block for this server. More...
 
void agt_yp_ha_check_standby_io (void)
 Check if the YP-SA Standby mode needs to check for input. More...
 
yp_ha_server_tagt_yp_ha_find_server (const xmlChar *server_name)
 Find a server record. More...
 
void agt_yp_ha_config_update (rpc_msg_t *msg, agt_cfg_transaction_t *txcb)
 Do a config update in the active role. More...
 
status_t agt_yp_ha_nvstore (void)
 Do an <nvstore> in the active role. More...
 
boolean agt_yp_ha_sil_disabled (void)
 Check if all hooks are enabled or disabled because of the YP-HA Standby mode. More...
 
void agt_yp_ha_mod_event (const xmlChar *name, const xmlChar *revision, val_value_t *inputval, boolean is_module, boolean is_load)
 Generate a module event. More...
 
status_t agt_yp_ha_get_config_info (ncx_transaction_id_t *config_id, const xmlChar **config_stamp)
 Get the config ID and timestamp info. More...
 
status_t agt_yp_ha_get_error_info (const xmlChar **tstamp, const xmlChar **msg)
 Get the last error time and error message, if any. More...
 
const xmlChar * agt_yp_ha_get_active_server (void)
 Get the active server or in progress of connecting. More...
 
status_t agt_yp_ha_get_config_counters (uint64 *updates, uint64 *failures)
 Get the config-updates and config-failures counters. More...
 

Detailed Description

YumaPro High Availability module (YP-HA)