Method: Redis::Commands#sentinel
- Defined in:
- lib/redis/commands.rb
#sentinel(subcommand, *args) ⇒ Array<String>, ...
Interact with the sentinel command (masters, master, slaves, failover)
211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 |
# File 'lib/redis/commands.rb', line 211 def sentinel(subcommand, *args) subcommand = subcommand.to_s.downcase send_command([:sentinel, subcommand] + args) do |reply| case subcommand when "get-master-addr-by-name" reply else if reply.is_a?(Array) if reply[0].is_a?(Array) reply.map(&Hashify) else Hashify.call(reply) end else reply end end end end |