diff --git a/src/sentinel.c b/src/sentinel.c index 3df4d3a08..f2fe1540c 100644 --- a/src/sentinel.c +++ b/src/sentinel.c @@ -368,6 +368,7 @@ dictType leaderVotesDictType = { void sentinelCommand(redisClient *c); void sentinelInfoCommand(redisClient *c); +void sentinelSetCommand(redisClient *c); struct redisCommand sentinelcmds[] = { {"ping",pingCommand,1,"",0,NULL,0,0,0,0,0}, @@ -2530,6 +2531,9 @@ void sentinelCommand(redisClient *c) { dictDelete(sentinel.masters,c->argv[2]->ptr); sentinelFlushConfig(); addReply(c,shared.ok); + } else if (!strcasecmp(c->argv[1]->ptr,"set")) { + if (c->argc < 3 || c->argc % 2 == 0) goto numargserr; + sentinelSetCommand(c); } else { addReplyErrorFormat(c,"Unknown sentinel subcommand '%s'", (char*)c->argv[1]->ptr); @@ -2541,6 +2545,7 @@ numargserr: (char*)c->argv[1]->ptr); } +/* SENTINEL INFO [section] */ void sentinelInfoCommand(redisClient *c) { char *section = c->argc == 2 ? c->argv[1]->ptr : "default"; sds info = sdsempty(); @@ -2600,6 +2605,79 @@ void sentinelInfoCommand(redisClient *c) { addReply(c,shared.crlf); } +/* SENTINEL SET [