Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
83ec3577
Commit
83ec3577
authored
Mar 30, 2018
by
antirez
Browse files
Modules Cluster API: node information struct and flags.
parent
a97df1a6
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/module.c
View file @
83ec3577
...
@@ -3825,6 +3825,13 @@ typedef struct moduleClusterReceiver {
...
@@ -3825,6 +3825,13 @@ typedef struct moduleClusterReceiver {
struct moduleClusterReceiver *next;
struct moduleClusterReceiver *next;
} moduleClusterReceiver;
} moduleClusterReceiver;
typedef struct moduleClusterNodeInfo {
int flags;
char ip[NET_IP_STR_LEN];
int port;
char master_id[40]; /* Only if flags & REDISMODULE_NODE_MASTER is true. */
} mdouleClusterNodeInfo;
/* We have an array of message types: each bucket is a linked list of
/* We have an array of message types: each bucket is a linked list of
* configured receivers. */
* configured receivers. */
static moduleClusterReceiver *clusterReceivers[UINT8_MAX];
static moduleClusterReceiver *clusterReceivers[UINT8_MAX];
...
...
src/redismodule.h
View file @
83ec3577
...
@@ -106,6 +106,12 @@
...
@@ -106,6 +106,12 @@
/* Cluster API defines. */
/* Cluster API defines. */
#define REDISMODULE_NODE_ID_LEN 40
#define REDISMODULE_NODE_ID_LEN 40
#define REDISMODULE_NODE_MYSELF (1<<0)
#define REDISMODULE_NODE_MASTER (1<<1)
#define REDISMODULE_NODE_SLAVE (1<<2)
#define REDISMODULE_NODE_PFAIL (1<<3)
#define REDISMODULE_NODE_FAIL (1<<4)
#define REDISMODULE_NODE_NOFAILOVER (1<<5)
#define REDISMODULE_NOT_USED(V) ((void) V)
#define REDISMODULE_NOT_USED(V) ((void) V)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment