diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-01-06 16:19:48 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-01-06 16:19:48 +0000 |
commit | b9ed71b1badf535aa989f056da56ccf8ed187b76 (patch) | |
tree | 7a398efed96ce3ffbd8a0c8f873340c53a292e30 /src/libstat/stat_internal.h | |
parent | 4b0615f1d6983ef1c9e3c292c4608d3f37df2172 (diff) | |
download | rspamd-b9ed71b1badf535aa989f056da56ccf8ed187b76.tar.gz rspamd-b9ed71b1badf535aa989f056da56ccf8ed187b76.zip |
Add preliminary support of async events in libstat
Diffstat (limited to 'src/libstat/stat_internal.h')
-rw-r--r-- | src/libstat/stat_internal.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/libstat/stat_internal.h b/src/libstat/stat_internal.h index 7e5804b8b..31257938d 100644 --- a/src/libstat/stat_internal.h +++ b/src/libstat/stat_internal.h @@ -65,6 +65,13 @@ typedef struct token_node_s { gdouble values[]; } rspamd_token_t; +struct rspamd_stat_async_elt { + void (*handler)(struct rspamd_stat_async_elt *elt, gpointer ud); + void (*cleanup)(struct rspamd_stat_async_elt *elt, gpointer ud); + struct event ev; + gpointer ud; +}; + struct rspamd_stat_ctx { /* Subroutines for all objects */ struct rspamd_stat_classifier *classifiers_subrs; @@ -79,6 +86,7 @@ struct rspamd_stat_ctx { /* Runtime configuration */ GPtrArray *statfiles; /* struct rspamd_statfile */ GPtrArray *classifiers; /* struct rspamd_classifier */ + GQueue *async_elts; /* struct rspamd_stat_async_elt */ struct rspamd_config *cfg; /* Global tokenizer */ struct rspamd_stat_tokenizer *tokenizer; |