cluster.h (1205B)
1 #ifndef UDPHOLE_CLUSTER_H 2 #define UDPHOLE_CLUSTER_H 3 4 #include "common/resp.h" 5 #include "node.h" 6 7 typedef struct { 8 cluster_nodes_t *nodes; 9 int initialized; 10 } cluster_state_t; 11 12 extern cluster_state_t *cluster_state; 13 14 void cluster_init(void); 15 16 void cluster_reload(void); 17 18 void cluster_shutdown(void); 19 20 resp_object *cluster_session_create(const char *cmd, resp_object *args); 21 resp_object *cluster_session_list(const char *cmd, resp_object *args); 22 resp_object *cluster_session_info(const char *cmd, resp_object *args); 23 resp_object *cluster_session_destroy(const char *cmd, resp_object *args); 24 resp_object *cluster_socket_create_listen(const char *cmd, resp_object *args); 25 resp_object *cluster_socket_create_connect(const char *cmd, resp_object *args); 26 resp_object *cluster_socket_destroy(const char *cmd, resp_object *args); 27 resp_object *cluster_forward_list(const char *cmd, resp_object *args); 28 resp_object *cluster_forward_create(const char *cmd, resp_object *args); 29 resp_object *cluster_forward_destroy(const char *cmd, resp_object *args); 30 resp_object *cluster_session_count(const char *cmd, resp_object *args); 31 resp_object *cluster_system_load(const char *cmd, resp_object *args); 32 33 #endif