X-Git-Url: https://arthur.barton.de/gitweb/?a=blobdiff_plain;f=src%2Fmain.h;h=38df0fea44773d213915d7b1a91c83439ad2a9c6;hb=b428238a72b11dc13bbe87257a53ae97f536d513;hp=d6b3107102be9a6f4a1b7e044cfc7a1f664d3f51;hpb=ed321f3f375edd6154f895a434682c006b27a1c2;p=netdata.git diff --git a/src/main.h b/src/main.h old mode 100755 new mode 100644 index d6b31071..38df0fea --- a/src/main.h +++ b/src/main.h @@ -1,7 +1,43 @@ #ifndef NETDATA_MAIN_H #define NETDATA_MAIN_H 1 +/** + * This struct contains information about command line options. + */ +struct option_def { + /** The option character */ + const char val; + /** The name of the long option. */ + const char *description; + /** Short descripton what the option does */ + /** Name of the argument displayed in SYNOPSIS */ + const char *arg_name; + /** Default value if not set */ + const char *default_value; +}; + +/** + * List of command line options. + * This can be used to compute manpage, help messages, ect. + */ +extern struct option_def options[]; + +struct netdata_static_thread { + char *name; + + char *config_section; + char *config_name; + + volatile int enabled; + + pthread_t *thread; + + void (*init_routine) (void); + void *(*start_routine) (void *); +}; + extern void kill_childs(void); extern int killpid(pid_t pid, int signal); +extern void netdata_cleanup_and_exit(int ret) NORETURN; #endif /* NETDATA_MAIN_H */