aboutsummaryrefslogtreecommitdiffstats
path: root/src/libstat/backends/backends.h
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2015-02-27 13:34:34 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2015-02-27 13:34:34 +0000
commit9e3a4c1020a558ae69183ba64317db0dcc320374 (patch)
tree0c6eeb7ca1a8c99c982760d8af864efe1bdddf56 /src/libstat/backends/backends.h
parent159cea78f1e37aacc6c7ce8187181822af10c627 (diff)
downloadrspamd-9e3a4c1020a558ae69183ba64317db0dcc320374.tar.gz
rspamd-9e3a4c1020a558ae69183ba64317db0dcc320374.zip
Add redis backend initialization.
Diffstat (limited to 'src/libstat/backends/backends.h')
-rw-r--r--src/libstat/backends/backends.h22
1 files changed, 21 insertions, 1 deletions
diff --git a/src/libstat/backends/backends.h b/src/libstat/backends/backends.h
index e775faf6e..e87a452d6 100644
--- a/src/libstat/backends/backends.h
+++ b/src/libstat/backends/backends.h
@@ -55,7 +55,7 @@ struct rspamd_stat_backend {
gpointer ctx;
};
-gpointer rspamd_mmaped_file_init(struct rspamd_stat_ctx *ctx, struct rspamd_config *cfg);
+gpointer rspamd_mmaped_file_init (struct rspamd_stat_ctx *ctx, struct rspamd_config *cfg);
gpointer rspamd_mmaped_file_runtime (struct rspamd_statfile_config *stcf,
gboolean learn, gpointer ctx);
gboolean rspamd_mmaped_file_process_token (struct token_node_s *tok,
@@ -75,4 +75,24 @@ gulong rspamd_mmaped_file_dec_learns (struct rspamd_statfile_runtime *runtime,
ucl_object_t * rspamd_mmaped_file_get_stat (struct rspamd_statfile_runtime *runtime,
gpointer ctx);
+gpointer rspamd_redis_init (struct rspamd_stat_ctx *ctx, struct rspamd_config *cfg);
+gpointer rspamd_redis_runtime (struct rspamd_statfile_config *stcf,
+ gboolean learn, gpointer ctx);
+gboolean rspamd_redis_process_token (struct token_node_s *tok,
+ struct rspamd_token_result *res,
+ gpointer ctx);
+gboolean rspamd_redis_learn_token (struct token_node_s *tok,
+ struct rspamd_token_result *res,
+ gpointer ctx);
+void rspamd_redis_finalize_learn (struct rspamd_statfile_runtime *runtime,
+ gpointer ctx);
+gulong rspamd_redis_total_learns (struct rspamd_statfile_runtime *runtime,
+ gpointer ctx);
+gulong rspamd_redis_inc_learns (struct rspamd_statfile_runtime *runtime,
+ gpointer ctx);
+gulong rspamd_redis_learns (struct rspamd_statfile_runtime *runtime,
+ gpointer ctx);
+ucl_object_t * rspamd_redis_get_stat (struct rspamd_statfile_runtime *runtime,
+ gpointer ctx);
+
#endif /* BACKENDS_H_ */