summaryrefslogtreecommitdiffstats
path: root/src/streaming/sender-destinations.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/streaming/sender-destinations.h')
-rw-r--r--src/streaming/sender-destinations.h38
1 files changed, 38 insertions, 0 deletions
diff --git a/src/streaming/sender-destinations.h b/src/streaming/sender-destinations.h
new file mode 100644
index 000000000..e7c72cef7
--- /dev/null
+++ b/src/streaming/sender-destinations.h
@@ -0,0 +1,38 @@
+// SPDX-License-Identifier: GPL-3.0-or-later
+
+#ifndef NETDATA_SENDER_DESTINATIONS_H
+#define NETDATA_SENDER_DESTINATIONS_H
+
+#include "libnetdata/libnetdata.h"
+#include "stream-handshake.h"
+#include "database/rrd.h"
+
+struct rrdpush_destinations {
+ STRING *destination;
+ bool ssl;
+ uint32_t attempts;
+ time_t since;
+ time_t postpone_reconnection_until;
+ STREAM_HANDSHAKE reason;
+
+ struct rrdpush_destinations *prev;
+ struct rrdpush_destinations *next;
+};
+
+void rrdpush_sender_ssl_init(RRDHOST *host);
+
+void rrdpush_reset_destinations_postpone_time(RRDHOST *host);
+
+void rrdpush_destinations_init(RRDHOST *host);
+void rrdpush_destinations_free(RRDHOST *host);
+
+int connect_to_one_of_destinations(
+ RRDHOST *host,
+ int default_port,
+ struct timeval *timeout,
+ size_t *reconnects_counter,
+ char *connected_to,
+ size_t connected_to_size,
+ struct rrdpush_destinations **destination);
+
+#endif //NETDATA_SENDER_DESTINATIONS_H