summaryrefslogtreecommitdiffstats
path: root/database/sqlite/sqlite_functions.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2021-05-19 12:33:27 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2021-05-19 12:33:27 +0000
commit841395dd16f470e3c051a0a4fff5b91efc983c30 (patch)
tree4115f6eedcddda75067130b80acaff9e51612f49 /database/sqlite/sqlite_functions.h
parentAdding upstream version 1.30.1. (diff)
downloadnetdata-841395dd16f470e3c051a0a4fff5b91efc983c30.tar.xz
netdata-841395dd16f470e3c051a0a4fff5b91efc983c30.zip
Adding upstream version 1.31.0.upstream/1.31.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'database/sqlite/sqlite_functions.h')
-rw-r--r--database/sqlite/sqlite_functions.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/database/sqlite/sqlite_functions.h b/database/sqlite/sqlite_functions.h
index d2bee75d2..30a52bf73 100644
--- a/database/sqlite/sqlite_functions.h
+++ b/database/sqlite/sqlite_functions.h
@@ -6,6 +6,17 @@
#include "../../daemon/common.h"
#include "sqlite3.h"
+// return a node list
+struct node_instance_list {
+ uuid_t node_id;
+ uuid_t host_id;
+ char *hostname;
+ int live;
+ int querable;
+ int hops;
+};
+
+
#define SQLITE_INSERT_DELAY (50) // Insert delay in case of lock
#define SQL_STORE_HOST "insert or replace into host (host_id,hostname,registry_hostname,update_every,os,timezone,tags) values (?1,?2,?3,?4,?5,?6,?7);"
@@ -60,4 +71,10 @@ extern void db_lock(void);
extern void delete_dimension_uuid(uuid_t *dimension_uuid);
extern void sql_store_chart_label(uuid_t *chart_uuid, int source_type, char *label, char *value);
extern void sql_build_context_param_list(struct context_param **param_list, RRDHOST *host, char *context, char *chart);
+extern void store_claim_id(uuid_t *host_id, uuid_t *claim_id);
+extern int update_node_id(uuid_t *host_id, uuid_t *node_id);
+extern int get_node_id(uuid_t *host_id, uuid_t *node_id);
+extern void invalidate_node_instances(uuid_t *host_id, uuid_t *claim_id);
+extern struct node_instance_list *get_node_list(void);
+extern void sql_load_node_id(RRDHOST *host);
#endif //NETDATA_SQLITE_FUNCTIONS_H