master
h 37 lines 1.3 KB
Raw
1 // SPDX-License-Identifier: GPL-3.0-or-later
2
3 #ifndef NETDATA_CLAIM_H
4 #define NETDATA_CLAIM_H 1
5
6 #include "daemon/common.h"
7 #include "cloud-status.h"
8 #include "claim_id.h"
9
10 const char *claim_agent_failure_reason_get(void);
11 void claim_agent_failure_reason_set(const char *format, ...) PRINTFLIKE(1, 2);
12
13 extern struct config cloud_config;
14
15 bool claim_agent(const char *url, const char *token, const char *rooms, const char *proxy, bool insecure);
16 bool claim_agent_automatically(void);
17
18 bool claimed_id_save_to_file(const char *claimed_id_str);
19
20 bool is_agent_claimed(void);
21 bool claim_id_matches(const char *claim_id);
22 bool claim_id_matches_any(const char *claim_id);
23 bool load_claiming_state(void);
24 void cloud_conf_load(int silent);
25 void cloud_conf_init_after_registry(void);
26 bool cloud_conf_save(void);
27 bool cloud_conf_regenerate(const char *claimed_id_str, const char *machine_guid, const char *hostname, const char *token, const char *rooms, const char *url, const char *proxy, bool insecure);
28 CLOUD_STATUS claim_reload_and_wait_online(void);
29
30 const char *cloud_config_url_get(void);
31 void cloud_config_url_set(const char *url);
32 const char *cloud_config_proxy_get(void);
33 const char *cloud_config_proxy_source_get(void);
34 bool cloud_config_proxy_is_explicitly_set(void);
35 bool cloud_config_insecure_get(void);
36
37 #endif //NETDATA_CLAIM_H