1 /* See the DRL-LICENSE file for this file's software license. */
6 #define _XOPEN_SOURCE 600
10 #include <sys/types.h>
12 #include <zookeeper.h>
14 static const uint16_t UNSUREACK = 3;
15 static const uint16_t NACK = 4;
17 typedef struct zkdrlcontext {
18 /** The host string that should be passed to zookeeper_init when using
19 * zookeeper. This consists of comma-separated ipaddr:port pairs. Example:
20 * "127.0.0.1:3000,127.0.0.1:3001,127.0.0.1:3002" */
23 pthread_rwlock_t *limiter_lock;
31 int zk_drl_init(comm_t *comm, uint32_t id, limiter_t *limiter, ident_config *config);
33 int zk_drl_close(comm_t *comm);
35 int zk_drl_recv(comm_t *comm, uint32_t id, int sock, remote_limiter_t *remote, message_t *msg);
37 void zk_drl_restart(comm_t *comm, int32_t view_number);