1 | /* |
2 | * replica_ping.h |
3 | * |
4 | * Copyright (C) 2017 Aerospike, Inc. |
5 | * |
6 | * Portions may be licensed to Aerospike, Inc. under one or more contributor |
7 | * license agreements. |
8 | * |
9 | * This program is free software: you can redistribute it and/or modify it under |
10 | * the terms of the GNU Affero General Public License as published by the Free |
11 | * Software Foundation, either version 3 of the License, or (at your option) any |
12 | * later version. |
13 | * |
14 | * This program is distributed in the hope that it will be useful, but WITHOUT |
15 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS |
16 | * FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more |
17 | * details. |
18 | * |
19 | * You should have received a copy of the GNU Affero General Public License |
20 | * along with this program. If not, see http://www.gnu.org/licenses/ |
21 | */ |
22 | |
23 | #pragma once |
24 | |
25 | //========================================================== |
26 | // Includes. |
27 | // |
28 | |
29 | #include <stdbool.h> |
30 | |
31 | #include "msg.h" |
32 | #include "node.h" |
33 | |
34 | #include "transaction/rw_request.h" |
35 | |
36 | |
37 | //========================================================== |
38 | // Forward declarations. |
39 | // |
40 | |
41 | struct as_transaction_s; |
42 | struct rw_request_s; |
43 | |
44 | |
45 | //========================================================== |
46 | // Public API. |
47 | // |
48 | |
49 | bool repl_ping_check(struct as_transaction_s* tr); |
50 | void repl_ping_make_message(struct rw_request_s* rw, struct as_transaction_s* tr); |
51 | void repl_ping_setup_rw(struct rw_request_s* rw, struct as_transaction_s* tr, repl_ping_done_cb repl_ping_cb, timeout_done_cb timeout_cb); |
52 | void repl_ping_reset_rw(struct rw_request_s* rw, struct as_transaction_s* tr, repl_ping_done_cb cb); |
53 | void repl_ping_handle_op(cf_node node, msg* m); |
54 | void repl_ping_handle_ack(cf_node node, msg* m); |
55 | |