aboutsummaryrefslogtreecommitdiffstats
path: root/src/lua/rspamd.luadoc
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2009-09-06 19:55:23 +0400
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2009-09-06 19:55:23 +0400
commitd1b63d4cff12936a5ea4380bccadcc77b7c3ed3f (patch)
tree33ea284a3c1f5e4c8366fc7eff545cd05c1448d9 /src/lua/rspamd.luadoc
parentab946cd1efd6b2ffcf1080d2a4f4c66dda811ef3 (diff)
downloadrspamd-d1b63d4cff12936a5ea4380bccadcc77b7c3ed3f.tar.gz
rspamd-d1b63d4cff12936a5ea4380bccadcc77b7c3ed3f.zip
* Add ability to call rspamd fucntions from lua api
* Make logging adaptive based on log speed (buffered vs unbuffered IO) * Fix lua API docs * Now lua modules can be loaded with glob patterns
Diffstat (limited to 'src/lua/rspamd.luadoc')
-rw-r--r--src/lua/rspamd.luadoc30
1 files changed, 27 insertions, 3 deletions
diff --git a/src/lua/rspamd.luadoc b/src/lua/rspamd.luadoc
index b83832a29..28f3f12f3 100644
--- a/src/lua/rspamd.luadoc
+++ b/src/lua/rspamd.luadoc
@@ -7,9 +7,8 @@
-- textpart - a single textual part of message
module Rspamd
---- Each lua module MUST have init function that is called after config file was read:
--- it should be like
--- function module:module_init(cfg)
+--- Each lua module has global rspamd_config that can be used for getting config
+-- options and registering callbacks (via metric interface)
------------------------------------- CONFIG -----------------------------------------
--
@@ -57,6 +56,31 @@ function task:get_urls ()
-- @return array of textpart objects
function task:get_text_parts ()
+--- Get raw headers
+-- @return string that contains raw headers
+function task:get_raw_headers ()
+
+--- Get array of received headers
+-- @return array of received headers that are tables itself
+function task:get_received_headers ()
+
+--- Resolve A record using rspamd async resolver
+-- @param host host to resolve
+-- @param callback name of callback function
+function task:resolve_dns_a (host, callback)
+
+--- Resolve PTR record using rspamd async resolver
+-- @param host host to resolve
+-- @param callback name of callback function
+function task:resolve_dns_ptr (host, callback)
+
+--- Callback function for dns resolving
+-- @param task task object
+-- @param to_resolve ptr or a record that was resolved
+-- @param results results of dns query (array or nil)
+-- @param err resolver error or nil
+function dns_cb(task, to_resolve, results, err)
+
------------------------------------- TEXTPART ---------------------------------------
--- Get part's content