blob: e7c72cef7b3dde6e9f5bc501ba6072043011df26 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
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
|