summaryrefslogtreecommitdiffstats
path: root/src/providers/fail_over.h
diff options
context:
space:
mode:
authorJan Zeleny <jzeleny@redhat.com>2012-06-04 12:06:53 -0400
committerJakub Hrozek <jhrozek@redhat.com>2012-08-01 16:19:41 +0200
commitbbd33e46aa6194c1086939f7cf8538c067186455 (patch)
treead91dc6f2042491e3728d096d7571f7e3b13e73a /src/providers/fail_over.h
parent75ee7925a9e289bc24f0ce8a7988cca926b71513 (diff)
downloadsssd-bbd33e46aa6194c1086939f7cf8538c067186455.tar.gz
sssd-bbd33e46aa6194c1086939f7cf8538c067186455.tar.xz
sssd-bbd33e46aa6194c1086939f7cf8538c067186455.zip
Primary server support: basic support in failover code
Now there are two list of servers for each service. If currently selected server is only backup, then an event will be scheduled which tries to get connection to one of primary servers and if it succeeds, it starts using this server instead of the one which is currently connected to.
Diffstat (limited to 'src/providers/fail_over.h')
-rw-r--r--src/providers/fail_over.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/providers/fail_over.h b/src/providers/fail_over.h
index 8fbbe251b..b69e8a532 100644
--- a/src/providers/fail_over.h
+++ b/src/providers/fail_over.h
@@ -116,9 +116,8 @@ int fo_get_server_count(struct fo_service *service);
* connection. If 'name' is NULL, no server resolution will be done.
*/
int fo_add_server(struct fo_service *service,
- const char *name,
- int port,
- void *user_data);
+ const char *name, int port,
+ void *user_data, bool primary);
int fo_add_srv_server(struct fo_service *service,
@@ -180,6 +179,8 @@ const char *fo_get_server_str_name(struct fo_server *server);
struct resolv_hostent *fo_get_server_hostent(struct fo_server *server);
+bool fo_is_server_primary(struct fo_server *server);
+
time_t fo_get_server_hostname_last_change(struct fo_server *server);
int fo_is_srv_lookup(struct fo_server *s);