diff options
author | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2012-03-26 19:44:44 +0400 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2012-03-26 19:44:44 +0400 |
commit | 7e440d6f4392a302d6cd4e886fe6da42ae87fed2 (patch) | |
tree | 6cfb4e7ce8e15c565688ebdd734b770eba167b23 /src/upstream.h | |
parent | 312a025f6ea39f044d12f93abc8b503e63ea15ba (diff) | |
download | rspamd-7e440d6f4392a302d6cd4e886fe6da42ae87fed2.tar.gz rspamd-7e440d6f4392a302d6cd4e886fe6da42ae87fed2.zip |
* Add lua bindings for upstream API.
Diffstat (limited to 'src/upstream.h')
-rw-r--r-- | src/upstream.h | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/upstream.h b/src/upstream.h index 101476bdf..da0a00013 100644 --- a/src/upstream.h +++ b/src/upstream.h @@ -4,7 +4,7 @@ #include <sys/types.h> #include <stdint.h> -/* +/** * Structure of generic upstream */ struct upstream { @@ -17,7 +17,7 @@ struct upstream { size_t ketama_points_size; /**< Ketama array size */ }; -/* +/** * Upstream error logic * 1. During error time we count upstream_ok and upstream_fail * 2. If failcount is more then maxerrors then we mark upstream as unavailable for dead time @@ -25,27 +25,27 @@ struct upstream { * 4. If all upstreams are dead, marks every upstream as alive */ -/* +/** * Add an error to an upstream */ void upstream_fail (struct upstream *up, time_t now); -/* +/** * Increase upstream successes count */ void upstream_ok (struct upstream *up, time_t now); -/* +/** * Make all upstreams alive */ void revive_all_upstreams (void *ups, size_t members, size_t msize); -/* +/** * Add ketama points for upstream */ gint upstream_ketama_add (struct upstream *up, gchar *up_key, size_t keylen, size_t keypoints); -/* +/** * Get a random upstream from array of upstreams * @param ups array of structures that contains struct upstream as their first element * @param members number of elements in array @@ -59,7 +59,7 @@ struct upstream* get_random_upstream (void *ups, size_t members, size_t msize, time_t now, time_t error_timeout, time_t revive_timeout, size_t max_errors); -/* +/** * Get upstream based on hash from array of upstreams * @param ups array of structures that contains struct upstream as their first element * @param members number of elements in array @@ -74,9 +74,9 @@ struct upstream* get_random_upstream (void *ups, size_t members, size_t msize, struct upstream* get_upstream_by_hash (void *ups, size_t members, size_t msize, time_t now, time_t error_timeout, time_t revive_timeout, size_t max_errors, - gchar *key, size_t keylen); + const gchar *key, size_t keylen); -/* +/** * Get an upstream from array of upstreams based on its current weight * @param ups array of structures that contains struct upstream as their first element * @param members number of elements in array @@ -90,7 +90,7 @@ struct upstream* get_upstream_round_robin (void *ups, size_t members, size_t msi time_t now, time_t error_timeout, time_t revive_timeout, size_t max_errors); -/* +/** * Get upstream based on hash from array of upstreams, this functions is using ketama algorithm * @param ups array of structures that contains struct upstream as their first element * @param members number of elements in array @@ -104,9 +104,9 @@ struct upstream* get_upstream_round_robin (void *ups, size_t members, size_t msi */ struct upstream* get_upstream_by_hash_ketama (void *ups, size_t members, size_t msize, time_t now, time_t error_timeout, time_t revive_timeout, size_t max_errors, - gchar *key, size_t keylen); + const gchar *key, size_t keylen); -/* +/** * Get an upstream from array of upstreams based on its current priority (not weight) * @param ups array of structures that contains struct upstream as their first element * @param members number of elements in array |