X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fdaemon%2Fplugin.h;h=a63f5cdc6e5e189e0461cf982f117e6d48b55a0f;hb=50345eec33951b964e2829e83c30399b71f2baba;hp=70a22326e09f7b3f492877711e6b5152e5e369c8;hpb=d5565943cd7ee338e5b750a027faff8115df4c72;p=collectd.git diff --git a/src/daemon/plugin.h b/src/daemon/plugin.h index 70a22326..a63f5cdc 100644 --- a/src/daemon/plugin.h +++ b/src/daemon/plugin.h @@ -97,7 +97,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 +125,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 +177,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; @@ -293,7 +295,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 +334,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 @@ -457,4 +459,10 @@ cdtime_t plugin_get_interval (void); int plugin_thread_create (pthread_t *thread, const pthread_attr_t *attr, void *(*start_routine) (void *), void *arg); +/* + * Plugins need to implement this + */ + +void module_register (void); + #endif /* PLUGIN_H */