mirror of
https://github.com/fluencelabs/redis
synced 2025-06-20 12:36:31 +00:00
First implementation of Redis Sentinel.
This commit implements the first, beta quality implementation of Redis Sentinel, a distributed monitoring system for Redis with notification and automatic failover capabilities. More info at http://redis.io/topics/sentinel
This commit is contained in:
11
src/config.c
11
src/config.c
@ -349,6 +349,17 @@ void loadServerConfigFromString(char *config) {
|
||||
}
|
||||
} else if (!strcasecmp(argv[0],"slave-priority") && argc == 2) {
|
||||
server.slave_priority = atoi(argv[1]);
|
||||
} else if (!strcasecmp(argv[0],"sentinel")) {
|
||||
/* argc == 1 is handled by main() as we need to enter the sentinel
|
||||
* mode ASAP. */
|
||||
if (argc != 1) {
|
||||
if (!server.sentinel_mode) {
|
||||
err = "sentinel directive while not in sentinel mode";
|
||||
goto loaderr;
|
||||
}
|
||||
err = sentinelHandleConfiguration(argv+1,argc-1);
|
||||
if (err) goto loaderr;
|
||||
}
|
||||
} else {
|
||||
err = "Bad directive or wrong number of arguments"; goto loaderr;
|
||||
}
|
||||
|
Reference in New Issue
Block a user