summaryrefslogtreecommitdiffstats
path: root/aclk/aclk_api.c
diff options
context:
space:
mode:
Diffstat (limited to 'aclk/aclk_api.c')
-rw-r--r--aclk/aclk_api.c39
1 files changed, 14 insertions, 25 deletions
diff --git a/aclk/aclk_api.c b/aclk/aclk_api.c
index a2e738ab..141d267a 100644
--- a/aclk/aclk_api.c
+++ b/aclk/aclk_api.c
@@ -13,10 +13,10 @@ usec_t aclk_session_us = 0;
time_t aclk_session_sec = 0;
int aclk_disable_runtime = 0;
-int aclk_disable_single_updates = 0;
int aclk_stats_enabled;
int use_mqtt_5 = 0;
+int aclk_ctx_based = 0;
#define ACLK_IMPL_KEY_NAME "aclk implementation"
@@ -33,25 +33,17 @@ void *aclk_starter(void *ptr) {
}
return aclk_main(ptr);
}
-
-void aclk_single_update_disable()
-{
- aclk_disable_single_updates = 1;
-}
-
-void aclk_single_update_enable()
-{
- aclk_disable_single_updates = 0;
-}
#endif /* ENABLE_ACLK */
-struct label *add_aclk_host_labels(struct label *label) {
+void add_aclk_host_labels(void) {
+ DICTIONARY *labels = localhost->host_labels;
+
#ifdef ENABLE_ACLK
- label = add_label_to_list(label, "_aclk_ng_available", "true", LABEL_SOURCE_AUTO);
+ rrdlabels_add(labels, "_aclk_ng_available", "true", RRDLABEL_SRC_AUTO|RRDLABEL_SRC_ACLK);
#else
- label = add_label_to_list(label, "_aclk_ng_available", "false", LABEL_SOURCE_AUTO);
+ rrdlabels_add(labels, "_aclk_ng_available", "false", RRDLABEL_SRC_AUTO|RRDLABEL_SRC_ACLK);
#endif
- label = add_label_to_list(label, "_aclk_legacy_available", "false", LABEL_SOURCE_AUTO);
+ rrdlabels_add(labels, "_aclk_legacy_available", "false", RRDLABEL_SRC_AUTO|RRDLABEL_SRC_ACLK);
#ifdef ENABLE_ACLK
ACLK_PROXY_TYPE aclk_proxy;
char *proxy_str;
@@ -69,17 +61,14 @@ struct label *add_aclk_host_labels(struct label *label) {
break;
}
- int mqtt5 = config_get_boolean(CONFIG_SECTION_CLOUD, "mqtt5", CONFIG_BOOLEAN_NO);
- label = add_label_to_list(label, "_mqtt_version", mqtt5 ? "5" : "3", LABEL_SOURCE_AUTO);
- label = add_label_to_list(label, "_aclk_impl", "Next Generation", LABEL_SOURCE_AUTO);
- label = add_label_to_list(label, "_aclk_proxy", proxy_str, LABEL_SOURCE_AUTO);
-#ifdef ENABLE_NEW_CLOUD_PROTOCOL
- label = add_label_to_list(label, "_aclk_ng_new_cloud_protocol", "true", LABEL_SOURCE_AUTO);
-#else
- label = add_label_to_list(label, "_aclk_ng_new_cloud_protocol", "false", LABEL_SOURCE_AUTO);
-#endif
+
+ int mqtt5 = config_get_boolean(CONFIG_SECTION_CLOUD, "mqtt5", CONFIG_BOOLEAN_YES);
+
+ rrdlabels_add(labels, "_mqtt_version", mqtt5 ? "5" : "3", RRDLABEL_SRC_AUTO);
+ rrdlabels_add(labels, "_aclk_impl", "Next Generation", RRDLABEL_SRC_AUTO);
+ rrdlabels_add(labels, "_aclk_proxy", proxy_str, RRDLABEL_SRC_AUTO);
+ rrdlabels_add(labels, "_aclk_ng_new_cloud_protocol", "true", RRDLABEL_SRC_AUTO|RRDLABEL_SRC_ACLK);
#endif
- return label;
}
char *aclk_state(void) {