summaryrefslogtreecommitdiffstats
path: root/src/plugins_d.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins_d.h')
-rwxr-xr-xsrc/plugins_d.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/src/plugins_d.h b/src/plugins_d.h
new file mode 100755
index 000000000..11e89e0ac
--- /dev/null
+++ b/src/plugins_d.h
@@ -0,0 +1,36 @@
+#include <sys/types.h>
+#include <unistd.h>
+
+
+#ifndef NETDATA_PLUGINS_D_H
+#define NETDATA_PLUGINS_D_H 1
+
+#define PLUGINSD_FILE_SUFFIX ".plugin"
+#define PLUGINSD_FILE_SUFFIX_LEN strlen(PLUGINSD_FILE_SUFFIX)
+#define PLUGINSD_CMD_MAX (FILENAME_MAX*2)
+#define PLUGINSD_LINE_MAX 1024
+
+struct plugind {
+ char id[CONFIG_MAX_NAME+1]; // config node id
+
+ char filename[FILENAME_MAX+1]; // just the filename
+ char fullfilename[FILENAME_MAX+1]; // with path
+ char cmd[PLUGINSD_CMD_MAX+1]; // the command that is executes
+
+ pid_t pid;
+ pthread_t thread;
+
+ int update_every;
+ int obsolete;
+ int enabled;
+
+ time_t started_t;
+
+ struct plugind *next;
+};
+
+extern struct plugind *pluginsd_root;
+
+extern void *pluginsd_main(void *ptr);
+
+#endif /* NETDATA_PLUGINS_D_H */