yumapro  21.10T-8
YumaPro SDK
agt_yp_ha_active.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2016 - 2021, YumaWorks, Inc., All Rights Reserved.
3  *
4  * Unless required by applicable law or agreed to in writing,
5  * software distributed under the License is distributed on an
6  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
7  * KIND, either express or implied. See the License for the
8  * specific language governing permissions and limitations
9  * under the License.
10  */
11 #ifdef WITH_YP_HA
12 #ifndef _H_agt_yp_ha_active
13 #define _H_agt_yp_ha_active
14 
15 /* FILE: agt_yp_ha_active.h
16 *********************************************************************
17 * *
18 * P U R P O S E *
19 * *
20 *********************************************************************/
21 
28 /*********************************************************************
29 * *
30 * C H A N G E H I S T O R Y *
31 * *
32 *********************************************************************
33 
34 date init comment
35 ----------------------------------------------------------------------
36 06-feb-16 abb Begun
37 */
38 
39 #ifndef _H_agt_yp_ha
40 #include "agt_yp_ha.h"
41 #endif
42 
43 #ifndef _H_status_enum
44 #include "status_enum.h"
45 #endif
46 
47 #ifdef __cplusplus
48 extern "C" {
49 #endif
50 
51 /********************************************************************
52 * *
53 * C O N S T A N T S *
54 * *
55 *********************************************************************/
56 
57 /********************************************************************
58 * *
59 * T Y P E S *
60 * *
61 *********************************************************************/
62 
63 
64 /********************************************************************
65 * *
66 * F U N C T I O N S *
67 * *
68 *********************************************************************/
69 
70 
71 
90 extern status_t
92 
93 
100 extern status_t
102 
103 
109 extern void
111 
112 
118 extern void
120 
121 
127 extern void
129 
130 
137 extern void
139  yp_ha_server_t *ha_server);
140 
141 
150 extern status_t
152  rpc_msg_t *msg,
153  agt_cfg_transaction_t *txcb);
154 
155 
162 extern status_t
164 
165 
177 extern void
179  const xmlChar *name,
180  const xmlChar *revision,
181  val_value_t *inputval,
182  boolean is_module,
183  boolean is_load);
184 
185 
196 extern status_t
198  ncx_transaction_id_t *config_id,
199  const xmlChar **config_stamp);
200 
201 
205 #ifdef __cplusplus
206 } /* end extern 'C' */
207 #endif
208 
209 #endif /* _H_agt_yp_ha_active */
210 #endif // WITH_YP_HA
void agt_yp_ha_active_cleanup(yp_ha_service_t *ha_serv)
Cleanup the YP-HA Active module.
Definition: agt_yp_ha_active.c:2099
uint64 ncx_transaction_id_t
transaction is scoped to single session write operation on a config
Definition: ncxtypes.h:700
NETCONF Server and Client RPC Request/Reply Message Header.
Definition: rpc.h:181
status_t agt_yp_ha_active_setup(yp_ha_service_t *ha_serv)
One time pre-init YP-HA Active mode.
Definition: agt_yp_ha_active.c:1921
Transaction Control Block.
Definition: agt_cfg.h:224
status_t agt_yp_ha_active_go(yp_ha_service_t *ha_serv)
Go into YP-HA Active server mode.
Definition: agt_yp_ha_active.c:2030
void agt_yp_ha_active_init(yp_ha_service_t *ha_serv)
Initialize the YP-HA Active module.
Definition: agt_yp_ha_active.c:2085
void agt_yp_ha_active_stop(yp_ha_service_t *ha_serv)
Exit from YP-HA Active server mode.
Definition: agt_yp_ha_active.c:2048
one value to match one type
Definition: val.h:870
status_t agt_yp_ha_active_get_config_info(yp_ha_service_t *ha_serv, ncx_transaction_id_t *config_id, const xmlChar **config_stamp)
Get the config ID and timestamp info.
Definition: agt_yp_ha_active.c:2231
status_t
global error return code
Definition: status_enum.h:186
status_t agt_yp_ha_active_nvstore(yp_ha_service_t *ha_serv)
Do an <nvstore> command to the standby servers.
Definition: agt_yp_ha_active.c:2163
void agt_yp_ha_active_cleanup_server(yp_ha_service_t *ha_serv, yp_ha_server_t *ha_server)
Cleanup the YP-HA Active Server subsystem record.
Definition: agt_yp_ha_active.c:2115
status_t agt_yp_ha_active_config_update(yp_ha_service_t *ha_serv, rpc_msg_t *msg, agt_cfg_transaction_t *txcb)
Do a config update in the active role.
Definition: agt_yp_ha_active.c:2140
YP-HA service instance.
Definition: agt_yp_ha.h:157
void agt_yp_ha_active_mod_event(yp_ha_service_t *ha_serv, const xmlChar *name, const xmlChar *revision, val_value_t *inputval, boolean is_module, boolean is_load)
Generate a module event.
Definition: agt_yp_ha_active.c:2185
For each CLI-configured ha-server there will be one entry entry the active and standby both need this...
Definition: agt_yp_ha.h:133
global error status code enumerations
YumaPro High Availability module (YP-HA)