diff options
author | michael-grunder <michael.grunder@gmail.com> | 2014-06-26 23:52:01 +0400 |
---|---|---|
committer | michael-grunder <michael.grunder@gmail.com> | 2015-05-06 01:02:04 +0300 |
commit | 8b83b8783f75a1a16d106a616678f4e9c6bd1ac8 (patch) | |
tree | a0777717bbe706c729f0ddcd7c72755448eab5f7 /cluster_library.h | |
parent | 03d14ab743ce5e9e2542e4868824b667cd2cf3ea (diff) |
Initial commit of save like commands
For commands like SAVE, BGSAVE, etc we need to change the
semantics from how you would call them directly, given that
we're communicating with multiple redis cluster nodes.
Each of these commands can be called in one of two ways.
1) Pass a single argument, which will be treated as a key,
and the command will be executed against the node where
we believe that key would live.
2) Pass a host and port, and as long as we know about this node
the command will be forwarded there.
Diffstat (limited to 'cluster_library.h')
-rw-r--r-- | cluster_library.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/cluster_library.h b/cluster_library.h index f020d487..c02890c5 100644 --- a/cluster_library.h +++ b/cluster_library.h @@ -345,6 +345,9 @@ PHPAPI int cluster_send_discard(redisCluster *c, short slot TSRMLS_DC); PHPAPI int cluster_abort_exec(redisCluster *c TSRMLS_DC); PHPAPI int cluster_reset_multi(redisCluster *c); + +PHPAPI short cluster_find_slot(redisCluster *c, const char *host, + unsigned short port); PHPAPI int cluster_send_slot(redisCluster *c, short slot, char *cmd, int cmd_len, REDIS_REPLY_TYPE rtype TSRMLS_DC); |