]> arthur.barton.de Git - netdata.git/blob - src/main.h
added more fping alarms; added the ability to have alarms that never send CLEAR notif...
[netdata.git] / src / main.h
1 #ifndef NETDATA_MAIN_H
2 #define NETDATA_MAIN_H 1
3
4 extern volatile sig_atomic_t netdata_exit;
5
6 /**
7  * This struct contains information about command line options.
8  */
9 struct option_def {
10     /** The option character */
11     const char val;
12     /** The name of the long option. */
13     const char *description;
14     /** Short descripton what the option does */
15     /** Name of the argument displayed in SYNOPSIS */
16     const char *arg_name;
17     /** Default value if not set */
18     const char *default_value;
19 };
20
21 /**
22  * List of command line options.
23  * This can be used to compute manpage, help messages, ect.
24  */
25 extern struct option_def options[];
26
27 struct netdata_static_thread {
28     char *name;
29
30     char *config_section;
31     char *config_name;
32
33     volatile int enabled;
34
35     pthread_t *thread;
36
37     void (*init_routine) (void);
38     void *(*start_routine) (void *);
39 };
40
41 extern void kill_childs(void);
42 extern int killpid(pid_t pid, int signal);
43 extern void netdata_cleanup_and_exit(int ret) NORETURN;
44
45 #endif /* NETDATA_MAIN_H */