1 | /*
|
---|
2 | CTDB client code
|
---|
3 |
|
---|
4 | Copyright (C) Amitay Isaacs 2015
|
---|
5 |
|
---|
6 | This program is free software; you can redistribute it and/or modify
|
---|
7 | it under the terms of the GNU General Public License as published by
|
---|
8 | the Free Software Foundation; either version 3 of the License, or
|
---|
9 | (at your option) any later version.
|
---|
10 |
|
---|
11 | This program is distributed in the hope that it will be useful,
|
---|
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
14 | GNU General Public License for more details.
|
---|
15 |
|
---|
16 | You should have received a copy of the GNU General Public License
|
---|
17 | along with this program; if not, see <http://www.gnu.org/licenses/>.
|
---|
18 | */
|
---|
19 |
|
---|
20 | #ifndef __CTDB_CLIENT_H__
|
---|
21 | #define __CTDB_CLIENT_H__
|
---|
22 |
|
---|
23 | #include <talloc.h>
|
---|
24 | #include <tevent.h>
|
---|
25 |
|
---|
26 | #include "protocol/protocol.h"
|
---|
27 | #include "common/srvid.h"
|
---|
28 |
|
---|
29 | struct ctdb_client_context;
|
---|
30 | struct ctdb_db_context;
|
---|
31 | struct ctdb_record_handle;
|
---|
32 |
|
---|
33 | typedef void (*ctdb_client_callback_func_t)(void *private_data);
|
---|
34 |
|
---|
35 | /* from client/client_connect.c */
|
---|
36 |
|
---|
37 | int ctdb_client_init(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
|
---|
38 | const char *sockpath, struct ctdb_client_context **ret);
|
---|
39 |
|
---|
40 | void ctdb_client_set_disconnect_callback(struct ctdb_client_context *client,
|
---|
41 | ctdb_client_callback_func_t func,
|
---|
42 | void *private_data);
|
---|
43 |
|
---|
44 | uint32_t ctdb_client_pnn(struct ctdb_client_context *client);
|
---|
45 |
|
---|
46 | void ctdb_client_wait(struct tevent_context *ev, bool *done);
|
---|
47 |
|
---|
48 | struct tevent_req *ctdb_recovery_wait_send(TALLOC_CTX *mem_ctx,
|
---|
49 | struct tevent_context *ev,
|
---|
50 | struct ctdb_client_context *client);
|
---|
51 |
|
---|
52 | bool ctdb_recovery_wait_recv(struct tevent_req *req, int *perr);
|
---|
53 |
|
---|
54 | /* from client/client_call.c */
|
---|
55 |
|
---|
56 | struct tevent_req *ctdb_client_call_send(TALLOC_CTX *mem_ctx,
|
---|
57 | struct tevent_context *ev,
|
---|
58 | struct ctdb_client_context *client,
|
---|
59 | struct ctdb_req_call *request);
|
---|
60 |
|
---|
61 | bool ctdb_client_call_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
|
---|
62 | struct ctdb_reply_call **reply, int *perr);
|
---|
63 |
|
---|
64 |
|
---|
65 | /* from client/client_message.c */
|
---|
66 |
|
---|
67 | struct tevent_req *ctdb_client_message_send(TALLOC_CTX *mem_ctx,
|
---|
68 | struct tevent_context *ev,
|
---|
69 | struct ctdb_client_context *client,
|
---|
70 | uint32_t destnode,
|
---|
71 | struct ctdb_req_message *message);
|
---|
72 |
|
---|
73 | bool ctdb_client_message_recv(struct tevent_req *req, int *perr);
|
---|
74 |
|
---|
75 | struct tevent_req *ctdb_client_message_multi_send(
|
---|
76 | TALLOC_CTX *mem_ctx,
|
---|
77 | struct tevent_context *ev,
|
---|
78 | struct ctdb_client_context *client,
|
---|
79 | uint32_t *pnn_list, int count,
|
---|
80 | struct ctdb_req_message *message);
|
---|
81 |
|
---|
82 | bool ctdb_client_message_multi_recv(struct tevent_req *req, int *perr,
|
---|
83 | TALLOC_CTX *mem_ctx, int **perr_list);
|
---|
84 |
|
---|
85 | int ctdb_client_message(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
|
---|
86 | struct ctdb_client_context *client,
|
---|
87 | uint32_t destnode, struct ctdb_req_message *message);
|
---|
88 |
|
---|
89 | struct tevent_req *ctdb_client_set_message_handler_send(
|
---|
90 | TALLOC_CTX *mem_ctx,
|
---|
91 | struct tevent_context *ev,
|
---|
92 | struct ctdb_client_context *client,
|
---|
93 | uint64_t srvid,
|
---|
94 | srvid_handler_fn handler,
|
---|
95 | void *private_data);
|
---|
96 | bool ctdb_client_set_message_handler_recv(struct tevent_req *req, int *perr);
|
---|
97 |
|
---|
98 | struct tevent_req *ctdb_client_remove_message_handler_send(
|
---|
99 | TALLOC_CTX *mem_ctx,
|
---|
100 | struct tevent_context *ev,
|
---|
101 | struct ctdb_client_context *client,
|
---|
102 | uint64_t srvid,
|
---|
103 | void *private_data);
|
---|
104 | bool ctdb_client_remove_message_handler_recv(struct tevent_req *req,
|
---|
105 | int *perr);
|
---|
106 |
|
---|
107 | int ctdb_client_set_message_handler(TALLOC_CTX *mem_ctx,
|
---|
108 | struct tevent_context *ev,
|
---|
109 | struct ctdb_client_context *client,
|
---|
110 | uint64_t srvid, srvid_handler_fn handler,
|
---|
111 | void *private_data);
|
---|
112 |
|
---|
113 | int ctdb_client_remove_message_handler(TALLOC_CTX *mem_ctx,
|
---|
114 | struct tevent_context *ev,
|
---|
115 | struct ctdb_client_context *client,
|
---|
116 | uint64_t srvid, void *private_data);
|
---|
117 |
|
---|
118 | /* from client/client_message_sync.c */
|
---|
119 |
|
---|
120 | int ctdb_message_recd_update_ip(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
|
---|
121 | struct ctdb_client_context *client,
|
---|
122 | int destnode, struct ctdb_public_ip *pubip);
|
---|
123 |
|
---|
124 | int ctdb_message_mem_dump(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
|
---|
125 | struct ctdb_client_context *client,
|
---|
126 | int destnode, struct ctdb_srvid_message *msg);
|
---|
127 |
|
---|
128 | int ctdb_message_reload_nodes(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
|
---|
129 | struct ctdb_client_context *client,
|
---|
130 | int destnode);
|
---|
131 |
|
---|
132 | int ctdb_message_takeover_run(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
|
---|
133 | struct ctdb_client_context *client,
|
---|
134 | int destnode, struct ctdb_srvid_message *msg);
|
---|
135 |
|
---|
136 | int ctdb_message_rebalance_node(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
|
---|
137 | struct ctdb_client_context *client,
|
---|
138 | int destnode, uint32_t pnn);
|
---|
139 |
|
---|
140 | int ctdb_message_disable_takeover_runs(TALLOC_CTX *mem_ctx,
|
---|
141 | struct tevent_context *ev,
|
---|
142 | struct ctdb_client_context *client,
|
---|
143 | int destnode,
|
---|
144 | struct ctdb_disable_message *disable);
|
---|
145 |
|
---|
146 | int ctdb_message_disable_recoveries(TALLOC_CTX *mem_ctx,
|
---|
147 | struct tevent_context *ev,
|
---|
148 | struct ctdb_client_context *client,
|
---|
149 | int destnode,
|
---|
150 | struct ctdb_disable_message *disable);
|
---|
151 |
|
---|
152 | int ctdb_message_disable_ip_check(TALLOC_CTX *mem_ctx,
|
---|
153 | struct tevent_context *ev,
|
---|
154 | struct ctdb_client_context *client,
|
---|
155 | int destnode, uint32_t timeout);
|
---|
156 |
|
---|
157 | /* from client/client_control.c */
|
---|
158 |
|
---|
159 | struct tevent_req *ctdb_client_control_send(TALLOC_CTX *mem_ctx,
|
---|
160 | struct tevent_context *ev,
|
---|
161 | struct ctdb_client_context *client,
|
---|
162 | uint32_t destnode,
|
---|
163 | struct timeval timeout,
|
---|
164 | struct ctdb_req_control *request);
|
---|
165 |
|
---|
166 | bool ctdb_client_control_recv(struct tevent_req *req, int *perr,
|
---|
167 | TALLOC_CTX *mem_ctx,
|
---|
168 | struct ctdb_reply_control **preply);
|
---|
169 |
|
---|
170 | struct tevent_req *ctdb_client_control_multi_send(
|
---|
171 | TALLOC_CTX *mem_ctx,
|
---|
172 | struct tevent_context *ev,
|
---|
173 | struct ctdb_client_context *client,
|
---|
174 | uint32_t *pnn_list, int count,
|
---|
175 | struct timeval timeout,
|
---|
176 | struct ctdb_req_control *request);
|
---|
177 |
|
---|
178 | bool ctdb_client_control_multi_recv(struct tevent_req *req, int *perr,
|
---|
179 | TALLOC_CTX *mem_ctx, int **perr_list,
|
---|
180 | struct ctdb_reply_control ***preply);
|
---|
181 |
|
---|
182 | int ctdb_client_control_multi_error(uint32_t *pnn_list, int count,
|
---|
183 | int *err_list, uint32_t *pnn);
|
---|
184 |
|
---|
185 | int ctdb_client_control(TALLOC_CTX *mem_ctx,
|
---|
186 | struct tevent_context *ev,
|
---|
187 | struct ctdb_client_context *client,
|
---|
188 | uint32_t destnode,
|
---|
189 | struct timeval timeout,
|
---|
190 | struct ctdb_req_control *c,
|
---|
191 | struct ctdb_reply_control **preply);
|
---|
192 |
|
---|
193 | int ctdb_client_control_multi(TALLOC_CTX *mem_ctx,
|
---|
194 | struct tevent_context *ev,
|
---|
195 | struct ctdb_client_context *client,
|
---|
196 | uint32_t *pnn_list, int count,
|
---|
197 | struct timeval timeout,
|
---|
198 | struct ctdb_req_control *request,
|
---|
199 | int **perr,
|
---|
200 | struct ctdb_reply_control ***preply);
|
---|
201 |
|
---|
202 | /* from client/client_control_sync.c */
|
---|
203 |
|
---|
204 | int ctdb_ctrl_process_exists(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
|
---|
205 | struct ctdb_client_context *client,
|
---|
206 | int destnode, struct timeval timeout,
|
---|
207 | pid_t pid, int *status);
|
---|
208 |
|
---|
209 | int ctdb_ctrl_statistics(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
|
---|
210 | struct ctdb_client_context *client,
|
---|
211 | int destnode, struct timeval timeout,
|
---|
212 | struct ctdb_statistics **stats);
|
---|
213 |
|
---|
214 | int ctdb_ctrl_ping(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
|
---|
215 | struct ctdb_client_context *client,
|
---|
216 | int destnode, struct timeval timeout,
|
---|
217 | int *num_clients);
|
---|
218 |
|
---|
219 | int ctdb_ctrl_getdbpath(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
|
---|
220 | struct ctdb_client_context *client,
|
---|
221 | int destnode, struct timeval timeout,
|
---|
222 | uint32_t db_id, const char **db_path);
|
---|
223 |
|
---|
224 | int ctdb_ctrl_getvnnmap(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
|
---|
225 | struct ctdb_client_context *client,
|
---|
226 | int destnode, struct timeval timeout,
|
---|
227 | struct ctdb_vnn_map **vnnmap);
|
---|
228 |
|
---|
229 | int ctdb_ctrl_getdebug(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
|
---|
230 | struct ctdb_client_context *client,
|
---|
231 | int destnode, struct timeval timeout,
|
---|
232 | uint32_t *loglevel);
|
---|
233 |
|
---|
234 | int ctdb_ctrl_setdebug(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
|
---|
235 | struct ctdb_client_context *client,
|
---|
236 | int destnode, struct timeval timeout,
|
---|
237 | uint32_t loglevel);
|
---|
238 |
|
---|
239 | int ctdb_ctrl_get_dbmap(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
|
---|
240 | struct ctdb_client_context *client,
|
---|
241 | int destnode, struct timeval timeout,
|
---|
242 | struct ctdb_dbid_map **dbmap);
|
---|
243 |
|
---|
244 | int ctdb_ctrl_pull_db(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
|
---|
245 | struct ctdb_client_context *client, int destnode,
|
---|
246 | struct timeval timeout, struct ctdb_pulldb *pulldb,
|
---|
247 | struct ctdb_rec_buffer **recbuf);
|
---|
248 |
|
---|
249 | int ctdb_ctrl_push_db(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
|
---|
250 | struct ctdb_client_context *client, int destnode,
|
---|
251 | struct timeval timeout, struct ctdb_rec_buffer *recbuf);
|
---|
252 |
|
---|
253 | int ctdb_ctrl_get_recmode(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
|
---|
254 | struct ctdb_client_context *client,
|
---|
255 | int destnode, struct timeval timeout,
|
---|
256 | int *recmode);
|
---|
257 |
|
---|
258 | int ctdb_ctrl_set_recmode(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
|
---|
259 | struct ctdb_client_context *client,
|
---|
260 | int destnode, struct timeval timeout,
|
---|
261 | int recmode);
|
---|
262 |
|
---|
263 | int ctdb_ctrl_statistics_reset(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
|
---|
264 | struct ctdb_client_context *client,
|
---|
265 | int destnode, struct timeval timeout);
|
---|
266 |
|
---|
267 | int ctdb_ctrl_db_attach(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
|
---|
268 | struct ctdb_client_context *client,
|
---|
269 | int destnode, struct timeval timeout,
|
---|
270 | const char *db_name, uint32_t tdb_flags,
|
---|
271 | uint32_t *db_id);
|
---|
272 |
|
---|
273 | int ctdb_ctrl_traverse_start(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
|
---|
274 | struct ctdb_client_context *client,
|
---|
275 | int destnode, struct timeval timeout,
|
---|
276 | struct ctdb_traverse_start *traverse);
|
---|
277 |
|
---|
278 | int ctdb_ctrl_register_srvid(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
|
---|
279 | struct ctdb_client_context *client,
|
---|
280 | int destnode, struct timeval timeout,
|
---|
281 | uint64_t srvid);
|
---|
282 |
|
---|
283 | int ctdb_ctrl_deregister_srvid(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
|
---|
284 | struct ctdb_client_context *client,
|
---|
285 | int destnode, struct timeval timeout,
|
---|
286 | uint64_t srvid);
|
---|
287 |
|
---|
288 | int ctdb_ctrl_get_dbname(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
|
---|
289 | struct ctdb_client_context *client,
|
---|
290 | int destnode, struct timeval timeout,
|
---|
291 | uint32_t db_id, const char **db_name);
|
---|
292 |
|
---|
293 | int ctdb_ctrl_enable_seqnum(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
|
---|
294 | struct ctdb_client_context *client,
|
---|
295 | int destnode, struct timeval timeout,
|
---|
296 | uint32_t db_id);
|
---|
297 |
|
---|
298 | int ctdb_ctrl_update_seqnum(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
|
---|
299 | struct ctdb_client_context *client,
|
---|
300 | int destnode, struct timeval timeout,
|
---|
301 | uint32_t db_id);
|
---|
302 |
|
---|
303 | int ctdb_ctrl_dump_memory(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
|
---|
304 | struct ctdb_client_context *client,
|
---|
305 | int destnode, struct timeval timeout,
|
---|
306 | const char **mem_str);
|
---|
307 |
|
---|
308 | int ctdb_ctrl_get_pid(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
|
---|
309 | struct ctdb_client_context *client,
|
---|
310 | int destnode, struct timeval timeout,
|
---|
311 | pid_t *pid);
|
---|
312 |
|
---|
313 | int ctdb_ctrl_get_recmaster(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
|
---|
314 | struct ctdb_client_context *client,
|
---|
315 | int destnode, struct timeval timeout,
|
---|
316 | uint32_t *recmaster);
|
---|
317 |
|
---|
318 | int ctdb_ctrl_set_recmaster(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
|
---|
319 | struct ctdb_client_context *client,
|
---|
320 | int destnode, struct timeval timeout,
|
---|
321 | uint32_t recmaster);
|
---|
322 |
|
---|
323 | int ctdb_ctrl_freeze(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
|
---|
324 | struct ctdb_client_context *client,
|
---|
325 | int destnode, struct timeval timeout,
|
---|
326 | int priority);
|
---|
327 |
|
---|
328 | int ctdb_ctrl_thaw(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
|
---|
329 | struct ctdb_client_context *client,
|
---|
330 | int destnode, struct timeval timeout,
|
---|
331 | int priority);
|
---|
332 |
|
---|
333 | int ctdb_ctrl_get_pnn(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
|
---|
334 | struct ctdb_client_context *client,
|
---|
335 | int destnode, struct timeval timeout,
|
---|
336 | uint32_t *pnn);
|
---|
337 |
|
---|
338 | int ctdb_ctrl_shutdown(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
|
---|
339 | struct ctdb_client_context *client,
|
---|
340 | int destnode, struct timeval timeout);
|
---|
341 |
|
---|
342 | int ctdb_ctrl_get_monmode(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
|
---|
343 | struct ctdb_client_context *client,
|
---|
344 | int destnode, struct timeval timeout,
|
---|
345 | int *mon_mode);
|
---|
346 |
|
---|
347 | int ctdb_ctrl_tcp_add(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
|
---|
348 | struct ctdb_client_context *client,
|
---|
349 | int destnode, struct timeval timeout,
|
---|
350 | struct ctdb_connection *conn);
|
---|
351 |
|
---|
352 | int ctdb_ctrl_tcp_remove(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
|
---|
353 | struct ctdb_client_context *client,
|
---|
354 | int destnode, struct timeval timeout,
|
---|
355 | struct ctdb_connection *conn);
|
---|
356 |
|
---|
357 | int ctdb_ctrl_set_tunable(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
|
---|
358 | struct ctdb_client_context *client,
|
---|
359 | int destnode, struct timeval timeout,
|
---|
360 | struct ctdb_tunable *tunable);
|
---|
361 |
|
---|
362 | int ctdb_ctrl_get_tunable(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
|
---|
363 | struct ctdb_client_context *client,
|
---|
364 | int destnode, struct timeval timeout,
|
---|
365 | const char *var, uint32_t *value);
|
---|
366 |
|
---|
367 | int ctdb_ctrl_list_tunables(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
|
---|
368 | struct ctdb_client_context *client,
|
---|
369 | int destnode, struct timeval timeout,
|
---|
370 | struct ctdb_var_list **var_list);
|
---|
371 |
|
---|
372 | int ctdb_ctrl_modify_flags(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
|
---|
373 | struct ctdb_client_context *client,
|
---|
374 | int destnode, struct timeval timeout,
|
---|
375 | uint32_t pnn, uint32_t old_flags,
|
---|
376 | uint32_t new_flags);
|
---|
377 |
|
---|
378 | int ctdb_ctrl_get_all_tunables(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
|
---|
379 | struct ctdb_client_context *client,
|
---|
380 | int destnode, struct timeval timeout,
|
---|
381 | struct ctdb_tunable_list **tun_list);
|
---|
382 |
|
---|
383 | int ctdb_ctrl_kill_tcp(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
|
---|
384 | struct ctdb_client_context *client,
|
---|
385 | int destnode, struct timeval timeout,
|
---|
386 | struct ctdb_connection *conn);
|
---|
387 |
|
---|
388 | int ctdb_ctrl_get_tcp_tickle_list(TALLOC_CTX *mem_ctx,
|
---|
389 | struct tevent_context *ev,
|
---|
390 | struct ctdb_client_context *client,
|
---|
391 | int destnode, struct timeval timeout,
|
---|
392 | ctdb_sock_addr *addr,
|
---|
393 | struct ctdb_tickle_list **tickles);
|
---|
394 |
|
---|
395 | int ctdb_ctrl_set_tcp_tickle_list(TALLOC_CTX *mem_ctx,
|
---|
396 | struct tevent_context *ev,
|
---|
397 | struct ctdb_client_context *client,
|
---|
398 | int destnode, struct timeval timeout,
|
---|
399 | struct ctdb_tickle_list *tickles);
|
---|
400 |
|
---|
401 | int ctdb_ctrl_register_server_id(TALLOC_CTX *mem_ctx,
|
---|
402 | struct tevent_context *ev,
|
---|
403 | struct ctdb_client_context *client,
|
---|
404 | int destnode, struct timeval timeout,
|
---|
405 | struct ctdb_client_id *cid);
|
---|
406 |
|
---|
407 | int ctdb_ctrl_unregister_server_id(TALLOC_CTX *mem_ctx,
|
---|
408 | struct tevent_context *ev,
|
---|
409 | struct ctdb_client_context *client,
|
---|
410 | int destnode, struct timeval timeout,
|
---|
411 | struct ctdb_client_id *cid);
|
---|
412 |
|
---|
413 | int ctdb_ctrl_check_server_id(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
|
---|
414 | struct ctdb_client_context *client,
|
---|
415 | int destnode, struct timeval timeout,
|
---|
416 | struct ctdb_client_id *cid);
|
---|
417 |
|
---|
418 | int ctdb_ctrl_get_server_id_list(TALLOC_CTX *mem_ctx,
|
---|
419 | struct tevent_context *ev,
|
---|
420 | struct ctdb_client_context *client,
|
---|
421 | int destnode, struct timeval timeout,
|
---|
422 | struct ctdb_client_id_map **cid_map);
|
---|
423 |
|
---|
424 | int ctdb_ctrl_db_attach_persistent(TALLOC_CTX *mem_ctx,
|
---|
425 | struct tevent_context *ev,
|
---|
426 | struct ctdb_client_context *client,
|
---|
427 | int destnode, struct timeval timeout,
|
---|
428 | const char *db_name, int tdb_flags,
|
---|
429 | uint32_t *db_id);
|
---|
430 |
|
---|
431 | int ctdb_ctrl_send_gratuitous_arp(TALLOC_CTX *mem_ctx,
|
---|
432 | struct tevent_context *ev,
|
---|
433 | struct ctdb_client_context *client,
|
---|
434 | int destnode, struct timeval timeout,
|
---|
435 | struct ctdb_addr_info *addr_info);
|
---|
436 |
|
---|
437 | int ctdb_ctrl_transaction_start(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
|
---|
438 | struct ctdb_client_context *client,
|
---|
439 | int destnode, struct timeval timeout,
|
---|
440 | uint32_t tid);
|
---|
441 |
|
---|
442 | int ctdb_ctrl_transaction_commit(TALLOC_CTX *mem_ctx,
|
---|
443 | struct tevent_context *ev,
|
---|
444 | struct ctdb_client_context *client,
|
---|
445 | int destnode, struct timeval timeout,
|
---|
446 | uint32_t tid);
|
---|
447 |
|
---|
448 | int ctdb_ctrl_wipe_database(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
|
---|
449 | struct ctdb_client_context *client,
|
---|
450 | int destnode, struct timeval timeout,
|
---|
451 | uint32_t db_id, uint32_t tid);
|
---|
452 |
|
---|
453 | int ctdb_ctrl_uptime(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
|
---|
454 | struct ctdb_client_context *client,
|
---|
455 | int destnode, struct timeval timeout,
|
---|
456 | struct ctdb_uptime **uptime);
|
---|
457 |
|
---|
458 | int ctdb_ctrl_start_recovery(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
|
---|
459 | struct ctdb_client_context *client,
|
---|
460 | int destnode, struct timeval timeout);
|
---|
461 |
|
---|
462 | int ctdb_ctrl_end_recovery(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
|
---|
463 | struct ctdb_client_context *client,
|
---|
464 | int destnode, struct timeval timeout);
|
---|
465 |
|
---|
466 | int ctdb_ctrl_reload_nodes_file(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
|
---|
467 | struct ctdb_client_context *client,
|
---|
468 | int destnode, struct timeval timeout);
|
---|
469 |
|
---|
470 | int ctdb_ctrl_enable_monitor(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
|
---|
471 | struct ctdb_client_context *client,
|
---|
472 | int destnode, struct timeval timeout);
|
---|
473 |
|
---|
474 | int ctdb_ctrl_disable_monitor(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
|
---|
475 | struct ctdb_client_context *client,
|
---|
476 | int destnode, struct timeval timeout);
|
---|
477 |
|
---|
478 | int ctdb_ctrl_add_public_ip(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
|
---|
479 | struct ctdb_client_context *client,
|
---|
480 | int destnode, struct timeval timeout,
|
---|
481 | struct ctdb_addr_info *addr_info);
|
---|
482 |
|
---|
483 | int ctdb_ctrl_del_public_ip(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
|
---|
484 | struct ctdb_client_context *client,
|
---|
485 | int destnode, struct timeval timeout,
|
---|
486 | struct ctdb_addr_info *addr_info);
|
---|
487 |
|
---|
488 | int ctdb_ctrl_run_eventscripts(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
|
---|
489 | struct ctdb_client_context *client,
|
---|
490 | int destnode, struct timeval timeout,
|
---|
491 | const char *event);
|
---|
492 |
|
---|
493 | int ctdb_ctrl_get_capabilities(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
|
---|
494 | struct ctdb_client_context *client,
|
---|
495 | int destnode, struct timeval timeout,
|
---|
496 | uint32_t *caps);
|
---|
497 |
|
---|
498 | int ctdb_ctrl_release_ip(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
|
---|
499 | struct ctdb_client_context *client,
|
---|
500 | int destnode, struct timeval timeout,
|
---|
501 | struct ctdb_public_ip *pubip);
|
---|
502 |
|
---|
503 | int ctdb_ctrl_takeover_ip(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
|
---|
504 | struct ctdb_client_context *client,
|
---|
505 | int destnode, struct timeval timeout,
|
---|
506 | struct ctdb_public_ip *pubip);
|
---|
507 |
|
---|
508 | int ctdb_ctrl_get_public_ips(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
|
---|
509 | struct ctdb_client_context *client,
|
---|
510 | int destnode, struct timeval timeout,
|
---|
511 | struct ctdb_public_ip_list **pubip_list);
|
---|
512 |
|
---|
513 | int ctdb_ctrl_get_nodemap(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
|
---|
514 | struct ctdb_client_context *client,
|
---|
515 | int destnode, struct timeval timeout,
|
---|
516 | struct ctdb_node_map **nodemap);
|
---|
517 |
|
---|
518 | int ctdb_ctrl_get_event_script_status(TALLOC_CTX *mem_ctx,
|
---|
519 | struct tevent_context *ev,
|
---|
520 | struct ctdb_client_context *client,
|
---|
521 | int destnode, struct timeval timeout,
|
---|
522 | enum ctdb_event event,
|
---|
523 | struct ctdb_script_list **slist);
|
---|
524 |
|
---|
525 | int ctdb_ctrl_traverse_kill(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
|
---|
526 | struct ctdb_client_context *client,
|
---|
527 | int destnode, struct timeval timeout,
|
---|
528 | struct ctdb_traverse_start *traverse);
|
---|
529 |
|
---|
530 | int ctdb_ctrl_get_reclock_file(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
|
---|
531 | struct ctdb_client_context *client,
|
---|
532 | int destnode, struct timeval timeout,
|
---|
533 | const char **reclock_file);
|
---|
534 |
|
---|
535 | int ctdb_ctrl_set_reclock_file(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
|
---|
536 | struct ctdb_client_context *client,
|
---|
537 | int destnode, struct timeval timeout,
|
---|
538 | const char *reclock_file);
|
---|
539 |
|
---|
540 | int ctdb_ctrl_stop_node(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
|
---|
541 | struct ctdb_client_context *client,
|
---|
542 | int destnode, struct timeval timeout);
|
---|
543 |
|
---|
544 | int ctdb_ctrl_continue_node(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
|
---|
545 | struct ctdb_client_context *client,
|
---|
546 | int destnode, struct timeval timeout);
|
---|
547 |
|
---|
548 | int ctdb_ctrl_set_natgwstate(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
|
---|
549 | struct ctdb_client_context *client,
|
---|
550 | int destnode, struct timeval timeout,
|
---|
551 | uint32_t natgw_role);
|
---|
552 |
|
---|
553 | int ctdb_ctrl_set_lmasterrole(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
|
---|
554 | struct ctdb_client_context *client,
|
---|
555 | int destnode, struct timeval timeout,
|
---|
556 | uint32_t lmaster_role);
|
---|
557 |
|
---|
558 | int ctdb_ctrl_set_recmasterrole(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
|
---|
559 | struct ctdb_client_context *client,
|
---|
560 | int destnode, struct timeval timeout,
|
---|
561 | uint32_t recmaster_role);
|
---|
562 |
|
---|
563 | int ctdb_ctrl_enable_script(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
|
---|
564 | struct ctdb_client_context *client,
|
---|
565 | int destnode, struct timeval timeout,
|
---|
566 | const char *script);
|
---|
567 |
|
---|
568 | int ctdb_ctrl_disable_script(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
|
---|
569 | struct ctdb_client_context *client,
|
---|
570 | int destnode, struct timeval timeout,
|
---|
571 | const char *script);
|
---|
572 |
|
---|
573 | int ctdb_ctrl_set_ban_state(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
|
---|
574 | struct ctdb_client_context *client,
|
---|
575 | int destnode, struct timeval timeout,
|
---|
576 | struct ctdb_ban_state *ban_state);
|
---|
577 |
|
---|
578 | int ctdb_ctrl_get_ban_state(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
|
---|
579 | struct ctdb_client_context *client,
|
---|
580 | int destnode, struct timeval timeout,
|
---|
581 | struct ctdb_ban_state **ban_state);
|
---|
582 |
|
---|
583 | int ctdb_ctrl_set_db_priority(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
|
---|
584 | struct ctdb_client_context *client,
|
---|
585 | int destnode, struct timeval timeout,
|
---|
586 | uint32_t db_id, int priority);
|
---|
587 |
|
---|
588 | int ctdb_ctrl_get_db_priority(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
|
---|
589 | struct ctdb_client_context *client,
|
---|
590 | int destnode, struct timeval timeout,
|
---|
591 | uint32_t db_id, uint32_t *priority);
|
---|
592 |
|
---|
593 | int ctdb_ctrl_transaction_cancel(TALLOC_CTX *mem_ctx,
|
---|
594 | struct tevent_context *ev,
|
---|
595 | struct ctdb_client_context *client,
|
---|
596 | int destnode, struct timeval timeout,
|
---|
597 | uint32_t tid);
|
---|
598 |
|
---|
599 | int ctdb_ctrl_register_notify(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
|
---|
600 | struct ctdb_client_context *client,
|
---|
601 | int destnode, struct timeval timeout,
|
---|
602 | struct ctdb_notify_data *notify);
|
---|
603 |
|
---|
604 | int ctdb_ctrl_deregister_notify(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
|
---|
605 | struct ctdb_client_context *client,
|
---|
606 | int destnode, struct timeval timeout,
|
---|
607 | uint64_t srvid);
|
---|
608 |
|
---|
609 | int ctdb_ctrl_trans3_commit(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
|
---|
610 | struct ctdb_client_context *client,
|
---|
611 | int destnode, struct timeval timeout,
|
---|
612 | struct ctdb_rec_buffer *recbuf);
|
---|
613 |
|
---|
614 | int ctdb_ctrl_get_db_seqnum(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
|
---|
615 | struct ctdb_client_context *client,
|
---|
616 | int destnode, struct timeval timeout,
|
---|
617 | uint32_t db_id, uint64_t *seqnum);
|
---|
618 |
|
---|
619 | int ctdb_ctrl_db_set_healthy(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
|
---|
620 | struct ctdb_client_context *client,
|
---|
621 | int destnode, struct timeval timeout,
|
---|
622 | uint32_t db_id);
|
---|
623 |
|
---|
624 | int ctdb_ctrl_db_get_health(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
|
---|
625 | struct ctdb_client_context *client,
|
---|
626 | int destnode, struct timeval timeout,
|
---|
627 | uint32_t db_id, const char **reason);
|
---|
628 |
|
---|
629 | int ctdb_ctrl_get_public_ip_info(TALLOC_CTX *mem_ctx,
|
---|
630 | struct tevent_context *ev,
|
---|
631 | struct ctdb_client_context *client,
|
---|
632 | int destnode, struct timeval timeout,
|
---|
633 | ctdb_sock_addr *addr,
|
---|
634 | struct ctdb_public_ip_info **ipinfo);
|
---|
635 |
|
---|
636 | int ctdb_ctrl_get_ifaces(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
|
---|
637 | struct ctdb_client_context *client,
|
---|
638 | int destnode, struct timeval timeout,
|
---|
639 | struct ctdb_iface_list **iface_list);
|
---|
640 |
|
---|
641 | int ctdb_ctrl_set_iface_link_state(TALLOC_CTX *mem_ctx,
|
---|
642 | struct tevent_context *ev,
|
---|
643 | struct ctdb_client_context *client,
|
---|
644 | int destnode, struct timeval timeout,
|
---|
645 | struct ctdb_iface *iface);
|
---|
646 |
|
---|
647 | int ctdb_ctrl_tcp_add_delayed_update(TALLOC_CTX *mem_ctx,
|
---|
648 | struct tevent_context *ev,
|
---|
649 | struct ctdb_client_context *client,
|
---|
650 | int destnode, struct timeval timeout,
|
---|
651 | struct ctdb_connection *conn);
|
---|
652 |
|
---|
653 | int ctdb_ctrl_get_stat_history(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
|
---|
654 | struct ctdb_client_context *client,
|
---|
655 | int destnode, struct timeval timeout,
|
---|
656 | struct ctdb_statistics_list **stats_list);
|
---|
657 |
|
---|
658 | int ctdb_ctrl_schedule_for_deletion(TALLOC_CTX *mem_ctx,
|
---|
659 | struct tevent_context *ev,
|
---|
660 | struct ctdb_client_context *client,
|
---|
661 | int destnode, struct timeval timeout,
|
---|
662 | struct ctdb_key_data *key);
|
---|
663 |
|
---|
664 | int ctdb_ctrl_set_db_readonly(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
|
---|
665 | struct ctdb_client_context *client,
|
---|
666 | int destnode, struct timeval timeout,
|
---|
667 | uint32_t db_id);
|
---|
668 |
|
---|
669 | int ctdb_ctrl_check_srvids(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
|
---|
670 | struct ctdb_client_context *client,
|
---|
671 | int destnode, struct timeval timeout,
|
---|
672 | uint64_t *srvid, int count, uint8_t **result);
|
---|
673 |
|
---|
674 | int ctdb_ctrl_traverse_start_ext(TALLOC_CTX *mem_ctx,
|
---|
675 | struct tevent_context *ev,
|
---|
676 | struct ctdb_client_context *client,
|
---|
677 | int destnode, struct timeval timeout,
|
---|
678 | struct ctdb_traverse_start_ext *traverse);
|
---|
679 |
|
---|
680 | int ctdb_ctrl_get_db_statistics(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
|
---|
681 | struct ctdb_client_context *client,
|
---|
682 | int destnode, struct timeval timeout,
|
---|
683 | uint32_t db_id,
|
---|
684 | struct ctdb_db_statistics **dbstats);
|
---|
685 |
|
---|
686 | int ctdb_ctrl_set_db_sticky(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
|
---|
687 | struct ctdb_client_context *client,
|
---|
688 | int destnode, struct timeval timeout,
|
---|
689 | uint32_t db_id);
|
---|
690 |
|
---|
691 | int ctdb_ctrl_reload_public_ips(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
|
---|
692 | struct ctdb_client_context *client,
|
---|
693 | int destnode, struct timeval timeout);
|
---|
694 |
|
---|
695 | int ctdb_ctrl_ipreallocated(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
|
---|
696 | struct ctdb_client_context *client,
|
---|
697 | int destnode, struct timeval timeout);
|
---|
698 |
|
---|
699 | int ctdb_ctrl_get_runstate(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
|
---|
700 | struct ctdb_client_context *client,
|
---|
701 | int destnode, struct timeval timeout,
|
---|
702 | enum ctdb_runstate *runstate);
|
---|
703 |
|
---|
704 | int ctdb_ctrl_db_detach(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
|
---|
705 | struct ctdb_client_context *client,
|
---|
706 | int destnode, struct timeval timeout,
|
---|
707 | uint32_t db_id);
|
---|
708 |
|
---|
709 | int ctdb_ctrl_get_nodes_file(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
|
---|
710 | struct ctdb_client_context *client,
|
---|
711 | int destnode, struct timeval timeout,
|
---|
712 | struct ctdb_node_map **nodemap);
|
---|
713 |
|
---|
714 | int ctdb_ctrl_db_freeze(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
|
---|
715 | struct ctdb_client_context *client,
|
---|
716 | int destnode, struct timeval timeout, uint32_t db_id);
|
---|
717 |
|
---|
718 | int ctdb_ctrl_db_thaw(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
|
---|
719 | struct ctdb_client_context *client,
|
---|
720 | int destnode, struct timeval timeout, uint32_t db_id);
|
---|
721 |
|
---|
722 | int ctdb_ctrl_db_transaction_start(TALLOC_CTX *mem_ctx,
|
---|
723 | struct tevent_context *ev,
|
---|
724 | struct ctdb_client_context *client,
|
---|
725 | int destnode, struct timeval timeout,
|
---|
726 | struct ctdb_transdb *transdb);
|
---|
727 |
|
---|
728 | int ctdb_ctrl_db_transaction_commit(TALLOC_CTX *mem_ctx,
|
---|
729 | struct tevent_context *ev,
|
---|
730 | struct ctdb_client_context *client,
|
---|
731 | int destnode, struct timeval timeout,
|
---|
732 | struct ctdb_transdb *transdb);
|
---|
733 |
|
---|
734 | int ctdb_ctrl_db_transaction_cancel(TALLOC_CTX *mem_ctx,
|
---|
735 | struct tevent_context *ev,
|
---|
736 | struct ctdb_client_context *client,
|
---|
737 | int destnode, struct timeval timeout,
|
---|
738 | uint32_t db_id);
|
---|
739 |
|
---|
740 | int ctdb_ctrl_db_pull(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
|
---|
741 | struct ctdb_client_context *client,
|
---|
742 | int destnode, struct timeval timeout,
|
---|
743 | struct ctdb_pulldb_ext *pulldb, uint32_t *num_records);
|
---|
744 |
|
---|
745 | int ctdb_ctrl_db_push_start(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
|
---|
746 | struct ctdb_client_context *client,
|
---|
747 | int destnode, struct timeval timeout,
|
---|
748 | struct ctdb_pulldb_ext *pulldb);
|
---|
749 |
|
---|
750 | int ctdb_ctrl_db_push_confirm(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
|
---|
751 | struct ctdb_client_context *client,
|
---|
752 | int destnode, struct timeval timeout,
|
---|
753 | uint32_t db_id, uint32_t *num_records);
|
---|
754 |
|
---|
755 | /* from client/client_db.c */
|
---|
756 |
|
---|
757 | struct tevent_req *ctdb_attach_send(TALLOC_CTX *mem_ctx,
|
---|
758 | struct tevent_context *ev,
|
---|
759 | struct ctdb_client_context *client,
|
---|
760 | struct timeval timeout,
|
---|
761 | const char *db_name, uint8_t db_flags);
|
---|
762 |
|
---|
763 | bool ctdb_attach_recv(struct tevent_req *req, int *perr,
|
---|
764 | struct ctdb_db_context **out);
|
---|
765 |
|
---|
766 | int ctdb_attach(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
|
---|
767 | struct ctdb_client_context *client,
|
---|
768 | struct timeval timeout,
|
---|
769 | const char *db_name, uint8_t db_flags,
|
---|
770 | struct ctdb_db_context **out);
|
---|
771 |
|
---|
772 | int ctdb_detach(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
|
---|
773 | struct ctdb_client_context *client,
|
---|
774 | struct timeval timeout, uint32_t db_id);
|
---|
775 |
|
---|
776 | uint32_t ctdb_db_id(struct ctdb_db_context *db);
|
---|
777 |
|
---|
778 | int ctdb_db_traverse(struct ctdb_db_context *db, bool readonly,
|
---|
779 | bool extract_header,
|
---|
780 | ctdb_rec_parser_func_t parser, void *private_data);
|
---|
781 |
|
---|
782 | struct tevent_req *ctdb_fetch_lock_send(TALLOC_CTX *mem_ctx,
|
---|
783 | struct tevent_context *ev,
|
---|
784 | struct ctdb_client_context *client,
|
---|
785 | struct ctdb_db_context *db,
|
---|
786 | TDB_DATA key, bool readonly);
|
---|
787 |
|
---|
788 | struct ctdb_record_handle *ctdb_fetch_lock_recv(struct tevent_req *req,
|
---|
789 | struct ctdb_ltdb_header *header,
|
---|
790 | TALLOC_CTX *mem_ctx,
|
---|
791 | TDB_DATA *data, int *perr);
|
---|
792 |
|
---|
793 | int ctdb_fetch_lock(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
|
---|
794 | struct ctdb_client_context *client,
|
---|
795 | struct ctdb_db_context *db, TDB_DATA key, bool readonly,
|
---|
796 | struct ctdb_record_handle **out,
|
---|
797 | struct ctdb_ltdb_header *header, TDB_DATA *data);
|
---|
798 |
|
---|
799 | int ctdb_store_record(struct ctdb_record_handle *h, TDB_DATA data);
|
---|
800 |
|
---|
801 | int ctdb_delete_record(struct ctdb_record_handle *h);
|
---|
802 |
|
---|
803 | struct tevent_req *ctdb_g_lock_lock_send(TALLOC_CTX *mem_ctx,
|
---|
804 | struct tevent_context *ev,
|
---|
805 | struct ctdb_client_context *client,
|
---|
806 | struct ctdb_db_context *db,
|
---|
807 | const char *keyname,
|
---|
808 | struct ctdb_server_id *sid,
|
---|
809 | bool readonly);
|
---|
810 |
|
---|
811 | bool ctdb_g_lock_lock_recv(struct tevent_req *req, int *perr);
|
---|
812 |
|
---|
813 | struct tevent_req *ctdb_g_lock_unlock_send(TALLOC_CTX *mem_ctx,
|
---|
814 | struct tevent_context *ev,
|
---|
815 | struct ctdb_client_context *client,
|
---|
816 | struct ctdb_db_context *db,
|
---|
817 | const char *keyname,
|
---|
818 | struct ctdb_server_id sid);
|
---|
819 |
|
---|
820 | bool ctdb_g_lock_unlock_recv(struct tevent_req *req, int *perr);
|
---|
821 |
|
---|
822 | struct tevent_req *ctdb_transaction_start_send(TALLOC_CTX *mem_ctx,
|
---|
823 | struct tevent_context *ev,
|
---|
824 | struct ctdb_client_context *client,
|
---|
825 | struct timeval timeout,
|
---|
826 | struct ctdb_db_context *db,
|
---|
827 | bool readonly);
|
---|
828 |
|
---|
829 | struct ctdb_transaction_handle *ctdb_transaction_start_recv(
|
---|
830 | struct tevent_req *req,
|
---|
831 | int *perr);
|
---|
832 |
|
---|
833 | int ctdb_transaction_start(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
|
---|
834 | struct ctdb_client_context *client,
|
---|
835 | struct timeval timeout,
|
---|
836 | struct ctdb_db_context *db, bool readonly,
|
---|
837 | struct ctdb_transaction_handle **out);
|
---|
838 |
|
---|
839 | int ctdb_transaction_fetch_record(struct ctdb_transaction_handle *h,
|
---|
840 | TDB_DATA key,
|
---|
841 | TALLOC_CTX *mem_ctx, TDB_DATA *data);
|
---|
842 |
|
---|
843 | int ctdb_transaction_store_record(struct ctdb_transaction_handle *h,
|
---|
844 | TDB_DATA key, TDB_DATA data);
|
---|
845 |
|
---|
846 | int ctdb_transaction_delete_record(struct ctdb_transaction_handle *h,
|
---|
847 | TDB_DATA key);
|
---|
848 |
|
---|
849 | struct tevent_req *ctdb_transaction_commit_send(
|
---|
850 | TALLOC_CTX *mem_ctx,
|
---|
851 | struct tevent_context *ev,
|
---|
852 | struct ctdb_transaction_handle *h);
|
---|
853 |
|
---|
854 | bool ctdb_transaction_commit_recv(struct tevent_req *req, int *perr);
|
---|
855 |
|
---|
856 | int ctdb_transaction_commit(struct ctdb_transaction_handle *h);
|
---|
857 |
|
---|
858 | int ctdb_transaction_cancel(struct ctdb_transaction_handle *h);
|
---|
859 |
|
---|
860 | /* from client/client_util.c */
|
---|
861 |
|
---|
862 | int list_of_nodes(struct ctdb_node_map *nodemap,
|
---|
863 | uint32_t flags_mask, uint32_t exclude_pnn,
|
---|
864 | TALLOC_CTX *mem_ctx, uint32_t **pnn_list);
|
---|
865 |
|
---|
866 | int list_of_active_nodes(struct ctdb_node_map *nodemap, uint32_t exclude_pnn,
|
---|
867 | TALLOC_CTX *mem_ctx, uint32_t **pnn_list);
|
---|
868 |
|
---|
869 | int list_of_connected_nodes(struct ctdb_node_map *nodemap,
|
---|
870 | uint32_t exclude_pnn,
|
---|
871 | TALLOC_CTX *mem_ctx, uint32_t **pnn_list);
|
---|
872 |
|
---|
873 | int ctdb_ctrl_modflags(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
|
---|
874 | struct ctdb_client_context *client,
|
---|
875 | uint32_t destnode, struct timeval timeout,
|
---|
876 | uint32_t set, uint32_t clear);
|
---|
877 |
|
---|
878 | bool ctdb_server_id_equal(struct ctdb_server_id *sid1,
|
---|
879 | struct ctdb_server_id *sid2);
|
---|
880 |
|
---|
881 | int ctdb_server_id_exists(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
|
---|
882 | struct ctdb_client_context *client,
|
---|
883 | struct ctdb_server_id *sid, bool *exists);
|
---|
884 |
|
---|
885 | #endif /* __CTDB_CLIENT_H__ */
|
---|