diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-02-06 16:11:34 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-02-06 16:11:34 +0000 |
commit | d079b656b4719739b2247dcd9d46e9bec793095a (patch) | |
tree | d2c950c70a776bcf697c963151c5bd959f8a9f03 /daemon/main.h | |
parent | Releasing debian version 1.37.1-2. (diff) | |
download | netdata-d079b656b4719739b2247dcd9d46e9bec793095a.tar.xz netdata-d079b656b4719739b2247dcd9d46e9bec793095a.zip |
Merging upstream version 1.38.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | daemon/main.h | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/daemon/main.h b/daemon/main.h index a4e2b3aa7..8704d6097 100644 --- a/daemon/main.h +++ b/daemon/main.h @@ -27,4 +27,35 @@ int killpid(pid_t pid); void netdata_cleanup_and_exit(int ret) NORETURN; void send_statistics(const char *action, const char *action_result, const char *action_data); +typedef enum { + ABILITY_DATA_QUERIES = (1 << 0), + ABILITY_WEB_REQUESTS = (1 << 1), + ABILITY_STREAMING_CONNECTIONS = (1 << 2), + SERVICE_MAINTENANCE = (1 << 3), + SERVICE_COLLECTORS = (1 << 4), + SERVICE_ML_TRAINING = (1 << 5), + SERVICE_ML_PREDICTION = (1 << 6), + SERVICE_REPLICATION = (1 << 7), + SERVICE_WEB_SERVER = (1 << 8), + SERVICE_ACLK = (1 << 9), + SERVICE_HEALTH = (1 << 10), + SERVICE_STREAMING = (1 << 11), + SERVICE_CONTEXT = (1 << 12), + SERVICE_ANALYTICS = (1 << 13), + SERVICE_EXPORTERS = (1 << 14), +} SERVICE_TYPE; + +typedef enum { + SERVICE_THREAD_TYPE_NETDATA, + SERVICE_THREAD_TYPE_LIBUV, + SERVICE_THREAD_TYPE_EVENT_LOOP, +} SERVICE_THREAD_TYPE; + +typedef void (*force_quit_t)(void *data); +typedef void (*request_quit_t)(void *data); + +void service_exits(void); +bool service_running(SERVICE_TYPE service); +struct service_thread *service_register(SERVICE_THREAD_TYPE thread_type, request_quit_t request_quit_callback, force_quit_t force_quit_callback, void *data, bool update __maybe_unused); + #endif /* NETDATA_MAIN_H */ |