diff --git a/src/commands.c b/src/commands.c index dfec3cdea..73351919f 100644 --- a/src/commands.c +++ b/src/commands.c @@ -3951,6 +3951,20 @@ struct redisCommandArg SENTINEL_SIMULATE_FAILURE_Args[] = { {0} }; +/********** SENTINEL SLAVES ********************/ + +/* SENTINEL SLAVES history */ +#define SENTINEL_SLAVES_History NULL + +/* SENTINEL SLAVES tips */ +#define SENTINEL_SLAVES_tips NULL + +/* SENTINEL SLAVES argument table */ +struct redisCommandArg SENTINEL_SLAVES_Args[] = { +{"master-name",ARG_TYPE_STRING,-1,NULL,NULL,NULL,CMD_ARG_NONE}, +{0} +}; + /* SENTINEL command table */ struct redisCommand SENTINEL_Subcommands[] = { {"ckquorum","Check for a Sentinel quorum",NULL,"2.8.4",CMD_DOC_NONE,NULL,NULL,COMMAND_GROUP_SENTINEL,SENTINEL_CKQUORUM_History,SENTINEL_CKQUORUM_tips,sentinelCommand,3,CMD_ADMIN|CMD_SENTINEL|CMD_ONLY_SENTINEL,0,.args=SENTINEL_CKQUORUM_Args}, @@ -3973,6 +3987,7 @@ struct redisCommand SENTINEL_Subcommands[] = { {"sentinels","List the Sentinel instances","O(N) where N is the number of Sentinels","2.8.4",CMD_DOC_NONE,NULL,NULL,COMMAND_GROUP_SENTINEL,SENTINEL_SENTINELS_History,SENTINEL_SENTINELS_tips,sentinelCommand,3,CMD_ADMIN|CMD_SENTINEL|CMD_ONLY_SENTINEL,0,.args=SENTINEL_SENTINELS_Args}, {"set","Change the configuration of a monitored master","O(1)","2.8.4",CMD_DOC_NONE,NULL,NULL,COMMAND_GROUP_SENTINEL,SENTINEL_SET_History,SENTINEL_SET_tips,sentinelCommand,-5,CMD_ADMIN|CMD_SENTINEL|CMD_ONLY_SENTINEL,0,.args=SENTINEL_SET_Args}, {"simulate-failure","Simulate failover scenarios",NULL,"3.2.0",CMD_DOC_NONE,NULL,NULL,COMMAND_GROUP_SENTINEL,SENTINEL_SIMULATE_FAILURE_History,SENTINEL_SIMULATE_FAILURE_tips,sentinelCommand,-3,CMD_ADMIN|CMD_SENTINEL|CMD_ONLY_SENTINEL,0,.args=SENTINEL_SIMULATE_FAILURE_Args}, +{"slaves","List the monitored slaves","O(N) where N is the number of slaves","2.8.0",CMD_DOC_DEPRECATED,"`SENTINEL REPLICAS`","5.0.0",COMMAND_GROUP_SENTINEL,SENTINEL_SLAVES_History,SENTINEL_SLAVES_tips,sentinelCommand,3,CMD_ADMIN|CMD_SENTINEL|CMD_ONLY_SENTINEL,0,.args=SENTINEL_SLAVES_Args}, {0} }; diff --git a/src/commands/sentinel-slaves.json b/src/commands/sentinel-slaves.json new file mode 100644 index 000000000..bce5c7692 --- /dev/null +++ b/src/commands/sentinel-slaves.json @@ -0,0 +1,27 @@ +{ + "SLAVES": { + "summary": "List the monitored slaves", + "complexity": "O(N) where N is the number of slaves", + "group": "sentinel", + "since": "2.8.0", + "arity": 3, + "container": "SENTINEL", + "function": "sentinelCommand", + "deprecated_since": "5.0.0", + "replaced_by": "`SENTINEL REPLICAS`", + "doc_flags": [ + "DEPRECATED" + ], + "command_flags": [ + "ADMIN", + "SENTINEL", + "ONLY_SENTINEL" + ], + "arguments": [ + { + "name": "master-name", + "type": "string" + } + ] + } +}