From dccf92aa82ccca974a280c22708047ea2594e15a Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Sat, 2 Jul 2022 13:32:56 +0100 Subject: [Feature] Allow lua_http module to accept upstreams --- src/lua/lua_common.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/lua/lua_common.h') diff --git a/src/lua/lua_common.h b/src/lua/lua_common.h index c961d37dd..a6e98a4ba 100644 --- a/src/lua/lua_common.h +++ b/src/lua/lua_common.h @@ -165,6 +165,11 @@ struct rspamd_lua_cached_entry { guint id; }; +struct rspamd_lua_upstream { + struct upstream *up; + gint upref; +}; + /* Common utility functions */ /** @@ -284,7 +289,9 @@ struct rspamd_lua_text *lua_new_text (lua_State *L, const gchar *start, */ bool lua_is_text_binary(struct rspamd_lua_text *t); -struct rspamd_lua_regexp *lua_check_regexp (lua_State *L, gint pos); +struct rspamd_lua_regexp* lua_check_regexp (lua_State *L, gint pos); + +struct rspamd_lua_upstream* lua_check_upstream(lua_State *L, int pos); enum rspamd_lua_task_header_type { RSPAMD_TASK_HEADER_PUSH_SIMPLE = 0, -- cgit v1.2.3