SLAVEOF command refactored into a proper API.

We now have replicationSetMaster() and replicationUnsetMaster() that can
be called in other contexts (for instance Redis Cluster).
This commit is contained in:
antirez
2013-03-04 13:22:21 +01:00
parent 2eb8a46061
commit 50d140e90b
2 changed files with 28 additions and 15 deletions

View File

@ -1025,6 +1025,8 @@ void replicationScriptCacheInit(void);
void replicationScriptCacheFlush(void);
void replicationScriptCacheAdd(sds sha1);
int replicationScriptCacheExists(sds sha1);
void replicationSetMaster(char *ip, int port);
void replicationUnsetMaster(void);
/* Generic persistence functions */
void startLoading(FILE *fp);