summaryrefslogtreecommitdiffstats
path: root/src/claim/claim_id.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-11-25 17:33:56 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-11-25 17:34:10 +0000
commit83ba6762cc43d9db581b979bb5e3445669e46cc2 (patch)
tree2e69833b43f791ed253a7a20318b767ebe56cdb8 /src/claim/claim_id.h
parentReleasing debian version 1.47.5-1. (diff)
downloadnetdata-83ba6762cc43d9db581b979bb5e3445669e46cc2.tar.xz
netdata-83ba6762cc43d9db581b979bb5e3445669e46cc2.zip
Merging upstream version 2.0.3+dfsg (Closes: #923993, #1042533, #1045145).
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/claim/claim_id.h')
-rw-r--r--src/claim/claim_id.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/claim/claim_id.h b/src/claim/claim_id.h
new file mode 100644
index 000000000..95958d430
--- /dev/null
+++ b/src/claim/claim_id.h
@@ -0,0 +1,28 @@
+// SPDX-License-Identifier: GPL-3.0-or-later
+
+#ifndef NETDATA_CLAIM_ID_H
+#define NETDATA_CLAIM_ID_H
+
+#include "claim.h"
+
+void claim_id_keep_current(void);
+
+bool claim_id_set_str(const char *claim_id_str);
+void claim_id_set(ND_UUID new_claim_id);
+void claim_id_clear_previous_working(void);
+ND_UUID claim_id_get_uuid(void);
+void claim_id_get_str(char str[UUID_STR_LEN]);
+const char *claim_id_get_str_mallocz(void);
+
+typedef struct {
+ ND_UUID uuid;
+ char str[UUID_STR_LEN];
+} CLAIM_ID;
+
+#define claim_id_is_set(claim_id) (!UUIDiszero(claim_id.uuid))
+
+CLAIM_ID claim_id_get(void);
+CLAIM_ID claim_id_get_last_working(void);
+CLAIM_ID rrdhost_claim_id_get(RRDHOST *host);
+
+#endif //NETDATA_CLAIM_ID_H