X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fdaemon%2Fplugin.h;h=73982279a665767650e41ef616731fe4960a1125;hb=ba6141349270c4ca127e9e0e6e83fc3c6460cf5c;hp=3db88e3f26406a3dccec3dd7e2fc6f86efbf3595;hpb=6a68a39a2c6987fdcc94fb1bdd9cc8f598fd9478;p=collectd.git diff --git a/src/daemon/plugin.h b/src/daemon/plugin.h index 3db88e3f..73982279 100644 --- a/src/daemon/plugin.h +++ b/src/daemon/plugin.h @@ -1,5 +1,5 @@ /** - * collectd - src/plugin.h + * collectd - src/daemon/plugin.h * Copyright (C) 2005-2014 Florian octo Forster * * Permission is hereby granted, free of charge, to any person obtaining a @@ -39,7 +39,9 @@ #define PLUGIN_FLAGS_GLOBAL 0x0001 -#define DATA_MAX_NAME_LEN 64 +#ifndef DATA_MAX_NAME_LEN +# define DATA_MAX_NAME_LEN 64 +#endif #define DS_TYPE_COUNTER 0 #define DS_TYPE_GAUGE 1 @@ -97,7 +99,7 @@ typedef union value_u value_t; struct value_list_s { value_t *values; - int values_len; + size_t values_len; cdtime_t time; cdtime_t interval; char host[DATA_MAX_NAME_LEN]; @@ -125,7 +127,7 @@ typedef struct data_source_s data_source_t; struct data_set_s { char type[DATA_MAX_NAME_LEN]; - int ds_num; + size_t ds_num; data_source_t *ds; }; typedef struct data_set_s data_set_t; @@ -177,6 +179,8 @@ typedef struct user_data_s user_data_t; struct plugin_ctx_s { cdtime_t interval; + cdtime_t flush_interval; + cdtime_t flush_timeout; }; typedef struct plugin_ctx_s plugin_ctx_t; @@ -238,10 +242,10 @@ void plugin_set_dir (const char *dir); */ int plugin_load (const char *name, uint32_t flags); -void plugin_init_all (void); +int plugin_init_all (void); void plugin_read_all (void); int plugin_read_all_once (void); -void plugin_shutdown_all (void); +int plugin_shutdown_all (void); /* * NAME @@ -293,7 +297,7 @@ int plugin_register_read (const char *name, * "plugin_register_complex_read" returns an error (non-zero). */ int plugin_register_complex_read (const char *group, const char *name, plugin_read_cb callback, - const struct timespec *interval, + cdtime_t interval, user_data_t *user_data); int plugin_register_write (const char *name, plugin_write_cb callback, user_data_t *user_data); @@ -332,7 +336,7 @@ int plugin_unregister_notification (const char *name); * Since some writers dynamically build their name it can be hard for * the configuring person to know it. This function will fill this gap. */ -void plugin_log_available_writers (); +void plugin_log_available_writers (void); /* * NAME