From: antirez Date: Thu, 7 Apr 2011 19:34:41 +0000 (+0200) Subject: node cluster configuration file configurable via redis.conf X-Git-Url: https://git.saurik.com/redis.git/commitdiff_plain/1793752d97d72c82ce237b461165d5a06c44587e?ds=inline node cluster configuration file configurable via redis.conf --- diff --git a/src/cluster.c b/src/cluster.c index 27630561..6d117aca 100644 --- a/src/cluster.c +++ b/src/cluster.c @@ -13,6 +13,7 @@ int clusterNodeGetSlotBit(clusterNode *n, int slot); sds clusterGenNodesDescription(void); clusterNode *clusterLookupNode(char *name); int clusterNodeAddSlave(clusterNode *master, clusterNode *slave); +int clusterAddSlot(clusterNode *n, int slot); /* ----------------------------------------------------------------------------- * Initialization diff --git a/src/config.c b/src/config.c index e40fdeda..48f90349 100644 --- a/src/config.c +++ b/src/config.c @@ -289,6 +289,9 @@ void loadServerConfig(char *filename) { if ((server.cluster_enabled = yesnotoi(argv[1])) == -1) { err = "argument must be 'yes' or 'no'"; goto loaderr; } + } else if (!strcasecmp(argv[0],"cluster-config-file") && argc == 2) { + zfree(server.cluster.configfile); + server.cluster.configfile = zstrdup(argv[1]); } else { err = "Bad directive or wrong number of arguments"; goto loaderr; }