aboutsummaryrefslogtreecommitdiffstats
path: root/src/libserver/cfg_file.h
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2015-01-17 21:53:49 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2015-01-18 23:05:15 +0000
commit665166c376a54f52b070e891780ca6209bbaa2d1 (patch)
tree034b58919947b10b1c5adb85796bc8d1a8ea0ed7 /src/libserver/cfg_file.h
parent5d9fc64987e526b3a3cccd3dcb5f980ccc8b83cb (diff)
downloadrspamd-665166c376a54f52b070e891780ca6209bbaa2d1.tar.gz
rspamd-665166c376a54f52b070e891780ca6209bbaa2d1.zip
Start refactoring of statistics in rspamd.
Diffstat (limited to 'src/libserver/cfg_file.h')
-rw-r--r--src/libserver/cfg_file.h47
1 files changed, 1 insertions, 46 deletions
diff --git a/src/libserver/cfg_file.h b/src/libserver/cfg_file.h
index 5844a945f..1beb51055 100644
--- a/src/libserver/cfg_file.h
+++ b/src/libserver/cfg_file.h
@@ -125,43 +125,6 @@ struct rspamd_symbols_group {
GList *symbols;
};
-/**
- * Statfile section definition
- */
-struct rspamd_statfile_section {
- guint32 code; /**< section's code */
- guint64 size; /**< size of section */
- double weight; /**< weight coefficient for section */
-};
-
-/**
- * Statfile autolearn parameters
- */
-struct statfile_autolearn_params {
- const gchar *metric; /**< metric name for autolearn triggering */
- double threshold_min; /**< threshold mark */
- double threshold_max; /**< threshold mark */
- GList *symbols; /**< list of symbols */
-};
-
-/**
- * Sync affinity
- */
-enum sync_affinity {
- AFFINITY_NONE = 0,
- AFFINITY_MASTER,
- AFFINITY_SLAVE
-};
-
-/**
- * Binlog params
- */
-struct statfile_binlog_params {
- enum sync_affinity affinity;
- time_t rotate_time;
- gchar *master_addr;
- guint16 master_port;
-};
typedef double (*statfile_normalize_func)(struct rspamd_config *cfg,
long double score, void *params);
@@ -171,15 +134,7 @@ typedef double (*statfile_normalize_func)(struct rspamd_config *cfg,
*/
struct rspamd_statfile_config {
gchar *symbol; /**< symbol of statfile */
- gchar *path; /**< filesystem pattern (with %r or %f) */
gchar *label; /**< label of this statfile */
- gsize size; /**< size of statfile */
- GList *sections; /**< list of sections in statfile */
- struct statfile_autolearn_params *autolearn; /**< autolearn params */
- struct statfile_binlog_params *binlog; /**< binlog params */
- statfile_normalize_func normalizer; /**< function that is used as normaliser */
- void *normalizer_data; /**< normalizer function params */
- gchar *normalizer_str; /**< source string (for dump) */
ucl_object_t *opts; /**< other options */
gboolean is_spam; /**< spam flag */
};
@@ -193,7 +148,7 @@ struct rspamd_classifier_config {
gchar *metric; /**< metric of this classifier */
struct classifier *classifier; /**< classifier interface */
struct tokenizer *tokenizer; /**< tokenizer used for classifier */
- GHashTable *opts; /**< other options */
+ ucl_object_t *opts; /**< other options */
GList *pre_callbacks; /**< list of callbacks that are called before classification */
GList *post_callbacks; /**< list of callbacks that are called after classification */
};