diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-11-09 08:36:07 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-11-25 11:21:20 +0000 |
commit | eae52fdaa9298e00f14b0b6256400d200db9c373 (patch) | |
tree | a3040a19bd024295ded05370853647bab9d7c225 /src/claim/claim_id.h | |
parent | Adding upstream version 1.47.5. (diff) | |
download | netdata-upstream/2.0.3.tar.xz netdata-upstream/2.0.3.zip |
Adding upstream version 2.0.3.upstream/2.0.3
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.h | 28 |
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 |