-
Notifications
You must be signed in to change notification settings - Fork 173
Home
-
SUPPORT REDIS CLUSTER
:- Connect to redis cluster and run commands. Handled ask and moved redirection.
-
SUPPORT MULTI-KEY COMMAND
:- Support
MSET
,MGET
andDEL
.
- Support
-
SUPPORT PIPELINE
:- Support redis pipeline and can contain multi-key command like above.
-
SUPPORT Asynchronous API
:- User can run commands with asynchronous mode.
redisClusterContext *redisClusterConnect(const char *addrs, int flags);
redisClusterContext *redisClusterConnectWithTimeout(const char *addrs, const struct timeval tv, int flags);
redisClusterContext *redisClusterConnectNonBlock(const char *addrs, int flags);
void redisClusterFree(redisClusterContext *cc);
void redisClusterSetMaxRedirect(redisClusterContext *cc, int max_redirect_count);
void *redisClusterCommand(redisClusterContext *cc, const char *format, ...);
int redisClusterAppendCommand(redisClusterContext *cc, const char *format, ...);
int redisClusterGetReply(redisClusterContext *cc, void **reply);
If you do not care about the reply for pipeline, then do not use redisClusterGetReply() , just calls redisCLusterReset one time. If the reply in the redisClusterGetReply() returns error, in the end calls redisCLusterReset one time.
void redisCLusterReset(redisClusterContext *cc);
redisClusterAsyncContext *redisClusterAsyncConnect(const char *addrs, int flags);
int redisClusterAsyncSetConnectCallback(redisClusterAsyncContext *acc, redisConnectCallback *fn);
int redisClusterAsyncSetDisconnectCallback(redisClusterAsyncContext *acc, redisDisconnectCallback *fn);
int redisClusterAsyncCommand(redisClusterAsyncContext *acc, redisClusterCallbackFn *fn, void *privdata, const char *format, ...);
void redisClusterAsyncDisconnect(redisClusterAsyncContext *acc);
void redisClusterAsyncFree(redisClusterAsyncContext *acc);