aboutsummaryrefslogtreecommitdiffstats
path: root/src/libutil/upstream.h
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2016-03-15 14:56:41 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2016-03-15 14:56:41 +0000
commit6151a4b7f85f6d62353d69b602db1fb0bade9402 (patch)
tree89950d942b6d3bac64af6517e8e85b05ab2cb6cf /src/libutil/upstream.h
parentaddeca94a989343bc4339dd7fffac4bb3329aaa1 (diff)
downloadrspamd-6151a4b7f85f6d62353d69b602db1fb0bade9402.tar.gz
rspamd-6151a4b7f85f6d62353d69b602db1fb0bade9402.zip
[Feature] Allow forced and non-forced upstreams selection
Diffstat (limited to 'src/libutil/upstream.h')
-rw-r--r--src/libutil/upstream.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/libutil/upstream.h b/src/libutil/upstream.h
index c3cbf685a..07b9302e8 100644
--- a/src/libutil/upstream.h
+++ b/src/libutil/upstream.h
@@ -191,6 +191,16 @@ struct upstream* rspamd_upstream_get (struct upstream_list *ups,
const guchar *key, gsize keylen);
/**
+ * Get new upstream from the list
+ * @param ups upstream list
+ * @param type type of rotation algorithm, for `RSPAMD_UPSTREAM_HASHED` it is required to specify `key` and `keylen` as arguments
+ * @return
+ */
+struct upstream* rspamd_upstream_get_forced (struct upstream_list *ups,
+ enum rspamd_upstream_rotation forced_type,
+ const guchar *key, gsize keylen);
+
+/**
* Re-resolve addresses for all upstreams registered
*/
void rspamd_upstream_reresolve (struct upstream_ctx *ctx);