module Cluster
Methods for managing Redis clusters.
Definitions
def cluster(subcommand, *arguments)
Sends the CLUSTER *
command to random node and returns its reply.
See https://redis.io/commands/cluster-addslots/ for more details.
Signature
-
parameter
subcommand
String, Symbol
the subcommand of cluster command e.g.
:addslots
,:delslots
,:nodes
,:replicas
,:info
-
returns
Object
depends on the subcommand provided
Implementation
def cluster(subcommand, *arguments)
call("CLUSTER", subcommand.to_s, *arguments)
end
def asking
Sends ASKING
command to random node and returns its reply.
See https://redis.io/commands/asking/ for more details.
Signature
-
returns
String
'OK'
Implementation
def asking
call("ASKING")
end