Handle Standby Server YP-HA role.
More...
Handle Standby Server YP-HA role.
Connect to active server when directed to go-standby. This server receives and applies config updates from the active server.
◆ agt_yp_ha_standby_check_cleanup()
Check if the cleanup of standby mode is needed.
- Parameters
-
ha_serv | HA service control block to use |
◆ agt_yp_ha_standby_cleanup()
Cleanup the YP-HA Standby module.
- Parameters
-
ha_serv | HA service control block to use |
◆ agt_yp_ha_standby_get_active_server()
const xmlChar * agt_yp_ha_standby_get_active_server |
( |
yp_ha_service_t * |
ha_serv | ) |
|
Get the active server or in progress of connecting.
- Parameters
-
ha_serv | HA service control block to use |
- Returns
- active-server or NULL if not available or not applicable
◆ agt_yp_ha_standby_get_config_info()
Get the config ID and timestamp info.
- Parameters
-
| ha_serv | HA service control block to use |
[out] | config_id | address of return config-id
*config_id return config-id |
[out] | config_stamp | address of return config-stamp *config_stamp return config-stamp |
- Returns
- status
◆ agt_yp_ha_standby_go()
Go into YP-HA Standby server mode.
- Parameters
-
ha_serv | HA service control block to use |
- Returns
- status of the operation
◆ agt_yp_ha_standby_init()
Initialize the YP-HA Standby module.
- Parameters
-
ha_serv | HA service control block to use |
◆ agt_yp_ha_standby_setup()
Setup the HA service standby_cb record for YP-HA Standby mode.
- Parameters
-
ha_serv | HA service control block to use |
new_server_id | name of active server to use |
- Returns
- status NO_ERR if this server able to setup YP-HA Standby mode
◆ agt_yp_ha_standby_stop()
Exit YP-HA Standby server mode.
- Parameters
-
ha_serv | HA service control block to use |