X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fdaemon%2Futils_match.h;h=f8aba2c54a95ab9bc87bcff89662bb965baf67d8;hb=1d888f3f3a131f8eb2d9e0884665b6951ecee550;hp=a1d10020e0472ffba04a66944eb038b4eb1417e6;hpb=3307054b6ab46b51fdda4f528e72d119e9de3071;p=collectd.git diff --git a/src/daemon/utils_match.h b/src/daemon/utils_match.h index a1d10020..f8aba2c5 100644 --- a/src/daemon/utils_match.h +++ b/src/daemon/utils_match.h @@ -28,6 +28,8 @@ #define UTILS_MATCH_H 1 #include "plugin.h" +#include "utils_latency.h" +#include "utils_latency_config.h" /* * Each type may have 12 sub-types @@ -46,6 +48,8 @@ #define UTILS_MATCH_CF_GAUGE_LAST 0x08 #define UTILS_MATCH_CF_GAUGE_INC 0x10 #define UTILS_MATCH_CF_GAUGE_ADD 0x20 +#define UTILS_MATCH_CF_GAUGE_PERSIST 0x40 +#define UTILS_MATCH_CF_GAUGE_LATENCY 0x80 #define UTILS_MATCH_CF_COUNTER_SET 0x01 #define UTILS_MATCH_CF_COUNTER_ADD 0x02 @@ -70,6 +74,7 @@ struct cu_match_value_s int ds_type; value_t value; unsigned int values_num; + latency_counter_t *latency; }; typedef struct cu_match_value_s cu_match_value_t; @@ -93,11 +98,13 @@ typedef struct cu_match_value_s cu_match_value_t; * callback. * The optional `excluderegex' allows to exclude the line from the match, if * the excluderegex matches. + * When `match_destroy' is called the `user_data' pointer is freed using + * the `free_user_data' callback - if it is not NULL. */ cu_match_t *match_create_callback (const char *regex, const char *excluderegex, int (*callback) (const char *str, char * const *matches, size_t matches_num, void *user_data), - void *user_data); + void *user_data, void (*free_user_data) (void *user_data)); /* * NAME