summaryrefslogtreecommitdiffstats
path: root/config.h.in
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2012-01-16 20:59:37 +0400
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2012-01-16 20:59:37 +0400
commit9bacf0d835d66aaddcdb9e664a34364f25ed2554 (patch)
tree8aa7287724a3abce1b6b63dc7215e101d44eb87d /config.h.in
parent9f2cb66ccbce8cd0fb659b79063bcebf1d816a1d (diff)
downloadrspamd-9bacf0d835d66aaddcdb9e664a34364f25ed2554.tar.gz
rspamd-9bacf0d835d66aaddcdb9e664a34364f25ed2554.zip
* Introduce new system of worker's and modules initialization:
- Removed legacy limitation of worker's types; - Using GQuarks to identify workers and modules; - Remove modules.sh script; - Add a common system of workers and modules; - Write management and configuration for new architecture.
Diffstat (limited to 'config.h.in')
-rw-r--r--config.h.in16
1 files changed, 14 insertions, 2 deletions
diff --git a/config.h.in b/config.h.in
index 8eedae5c0..8ad00557d 100644
--- a/config.h.in
+++ b/config.h.in
@@ -433,14 +433,26 @@
/* Forwarded declaration */
struct module_ctx;
struct config_file;
+struct rspamd_worker;
typedef struct module_s {
- const char *name;
+ const gchar *name;
int (*module_init_func)(struct config_file *cfg, struct module_ctx **ctx);
int (*module_config_func)(struct config_file *cfg);
int (*module_reconfig_func)(struct config_file *cfg);
} module_t;
-extern module_t modules[];
+typedef struct worker_s {
+ const gchar *name;
+ gpointer (*worker_init_func)();
+ void (*worker_start_func)(struct rspamd_worker *worker);
+ gboolean has_socket;
+ gboolean unique;
+ gboolean threaded;
+ gboolean killable;
+} worker_t;
+
+extern module_t *modules[];
+extern worker_t *workers[];
#endif