summaryrefslogtreecommitdiff
path: root/lib/reconnect.h
diff options
context:
space:
mode:
authorBen Pfaff <blp@ovn.org>2018-01-22 11:04:58 -0800
committerBen Pfaff <blp@ovn.org>2018-03-24 12:04:51 -0700
commit5ee527e223b266d06c37d93d54695dc48e890cbf (patch)
tree5a0c8a69d1261d86c7c9e4cef92f736010d47bc1 /lib/reconnect.h
parentf70b61d33dd3a099cd51e95b1047c50c6bf331ca (diff)
downloadopenvswitch-5ee527e223b266d06c37d93d54695dc48e890cbf.tar.gz
reconnect: Add ability to do a number of retries without backoff.
This is aimed at an upcoming database clustering implementation, where it's desirable to try all of the cluster members quickly before backing off to retry them again in sequence. Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Russell Bryant <russell@ovn.org> Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Justin Pettit <jpettit@ovn.org>
Diffstat (limited to 'lib/reconnect.h')
-rw-r--r--lib/reconnect.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/reconnect.h b/lib/reconnect.h
index 4446713ce..9f2d469e2 100644
--- a/lib/reconnect.h
+++ b/lib/reconnect.h
@@ -51,6 +51,8 @@ int reconnect_get_probe_interval(const struct reconnect *);
void reconnect_set_max_tries(struct reconnect *, unsigned int max_tries);
unsigned int reconnect_get_max_tries(struct reconnect *);
+void reconnect_set_backoff_free_tries(struct reconnect *,
+ unsigned int backoff_free_tries);
void reconnect_set_backoff(struct reconnect *,
int min_backoff, int max_backoff);
@@ -65,6 +67,7 @@ void reconnect_enable(struct reconnect *, long long int now);
void reconnect_disable(struct reconnect *, long long int now);
void reconnect_force_reconnect(struct reconnect *, long long int now);
+void reconnect_skip_backoff(struct reconnect *);
bool reconnect_is_connected(const struct reconnect *);
unsigned int reconnect_get_last_connect_elapsed(const struct reconnect *,