master
h 32 lines 788 Bytes
Raw
1 // SPDX-License-Identifier: GPL-3.0-or-later
2
3 #ifndef NETDATA_STREAM_REPLICATION_TRACKING_H
4 #define NETDATA_STREAM_REPLICATION_TRACKING_H
5
6 #include "libnetdata/libnetdata.h"
7
8 // #define REPLICATION_TRACKING 1
9
10 #ifdef REPLICATION_TRACKING
11
12 typedef enum __attribute__((packed)) {
13 REPLAY_WHO_UNKNOWN = 0, // default value
14 REPLAY_WHO_ME, // I have to respond
15 REPLAY_WHO_THEM, // they have to respond
16 REPLAY_WHO_FINISHED, // replication finished
17
18 // terminator
19 REPLAY_WHO_MAX,
20 } REPLAY_WHO;
21
22 struct replay_who_counters {
23 size_t rcv[REPLAY_WHO_MAX];
24 size_t snd[REPLAY_WHO_MAX];
25 };
26
27 struct rrdhost;
28 void replication_tracking_counters(struct rrdhost *host, struct replay_who_counters *c);
29
30 #endif
31
32 #endif //NETDATA_STREAM_REPLICATION_TRACKING_H