summaryrefslogtreecommitdiffstats
path: root/aclk/legacy/aclk_common.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2021-12-01 06:15:04 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2021-12-01 06:15:04 +0000
commite970e0b37b8bd7f246feb3f70c4136418225e434 (patch)
tree0b67c0ca45f56f2f9d9c5c2e725279ecdf52d2eb /aclk/legacy/aclk_common.h
parentAdding upstream version 1.31.0. (diff)
downloadnetdata-e970e0b37b8bd7f246feb3f70c4136418225e434.tar.xz
netdata-e970e0b37b8bd7f246feb3f70c4136418225e434.zip
Adding upstream version 1.32.0.upstream/1.32.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'aclk/legacy/aclk_common.h')
-rw-r--r--aclk/legacy/aclk_common.h37
1 files changed, 8 insertions, 29 deletions
diff --git a/aclk/legacy/aclk_common.h b/aclk/legacy/aclk_common.h
index eedb5b51..080680ff 100644
--- a/aclk/legacy/aclk_common.h
+++ b/aclk/legacy/aclk_common.h
@@ -1,12 +1,12 @@
#ifndef ACLK_COMMON_H
#define ACLK_COMMON_H
-#include "aclk_rrdhost_state.h"
-#include "../../daemon/common.h"
+#include "../aclk_rrdhost_state.h"
+#include "daemon/common.h"
-extern netdata_mutex_t aclk_shared_state_mutex;
-#define ACLK_SHARED_STATE_LOCK netdata_mutex_lock(&aclk_shared_state_mutex)
-#define ACLK_SHARED_STATE_UNLOCK netdata_mutex_unlock(&aclk_shared_state_mutex)
+extern netdata_mutex_t legacy_aclk_shared_state_mutex;
+#define legacy_aclk_shared_state_LOCK netdata_mutex_lock(&legacy_aclk_shared_state_mutex)
+#define legacy_aclk_shared_state_UNLOCK netdata_mutex_unlock(&legacy_aclk_shared_state_mutex)
// minimum and maximum supported version of ACLK
// in this version of agent
@@ -33,8 +33,8 @@ extern netdata_mutex_t aclk_shared_state_mutex;
#define ACLK_IS_HOST_INITIALIZING(host) (host->aclk_state.state == ACLK_HOST_INITIALIZING)
#define ACLK_IS_HOST_POPCORNING(host) (ACLK_IS_HOST_INITIALIZING(host) && host->aclk_state.t_last_popcorn_update)
-extern struct aclk_shared_state {
- // optimization to avoid looping trough hosts
+extern struct legacy_aclk_shared_state {
+ // optimization to avoid looping through hosts
// every time Query Thread wakes up
RRDHOST *next_popcorn_host;
@@ -42,31 +42,10 @@ extern struct aclk_shared_state {
// protect by lock otherwise
int version_neg;
usec_t version_neg_wait_till;
-} aclk_shared_state;
-
-typedef enum aclk_proxy_type {
- PROXY_TYPE_UNKNOWN = 0,
- PROXY_TYPE_SOCKS5,
- PROXY_TYPE_HTTP,
- PROXY_DISABLED,
- PROXY_NOT_SET,
-} ACLK_PROXY_TYPE;
-
-extern int aclk_kill_link; // Tells the agent to tear down the link
-extern int aclk_disable_runtime;
+} legacy_aclk_shared_state;
const char *aclk_proxy_type_to_s(ACLK_PROXY_TYPE *type);
-#define ACLK_PROXY_PROTO_ADDR_SEPARATOR "://"
-#define ACLK_PROXY_ENV "env"
-#define ACLK_PROXY_CONFIG_VAR "proxy"
-
-ACLK_PROXY_TYPE aclk_verify_proxy(const char *string);
-const char *aclk_lws_wss_get_proxy_setting(ACLK_PROXY_TYPE *type);
-void safe_log_proxy_censor(char *proxy);
int aclk_decode_base_url(char *url, char **aclk_hostname, int *aclk_port);
-const char *aclk_get_proxy(ACLK_PROXY_TYPE *type);
-
-struct label *add_aclk_host_labels(struct label *label);
#endif //ACLK_COMMON_H