Skip to content

Commit

Permalink
clusterer: added register and send_to API functions
Browse files Browse the repository at this point in the history
  • Loading branch information
eseanucristian committed Aug 17, 2015
1 parent 6b61980 commit efb0c5b
Show file tree
Hide file tree
Showing 5 changed files with 904 additions and 94 deletions.
8 changes: 8 additions & 0 deletions modules/clusterer/api.h
Expand Up @@ -6,6 +6,8 @@
#define STATUS_PERMANENT_DOWN 0
#define STATUS_UP 1
#define STATUS_TEMPORARY_DOWN 2
#define SERVER_TEMP_DISABLED -1
#define SERVER_TIMEOUT -2

typedef struct clusterer_node_ clusterer_node_t;

Expand All @@ -29,13 +31,19 @@ typedef int (*set_state_f) (int, int, int, int);
typedef void (*free_nodes_f) (clusterer_node_t *);
typedef int (*check_connection_f) (int, union sockaddr_union*, int, int);
typedef int (*get_my_id_f) (void);
typedef int (*send_to_f) (int, int);
typedef int (*register_module_f) (char *, int, void (*cb)(int, struct receive_info *, int),
int, int, int);


struct clusterer_binds {
get_nodes_f get_nodes;
free_nodes_f free_nodes;
set_state_f set_state;
check_connection_f check;
get_my_id_f get_my_id;
send_to_f send_to;
register_module_f register_module;
};


Expand Down

0 comments on commit efb0c5b

Please sign in to comment.