Module: Redis::Cluster::NodeLoader

Defined in:
lib/redis/cluster/node_loader.rb

Overview

Load and hashify node info for Redis Cluster Client

Class Method Summary collapse

Class Method Details

.load_flags(nodes) ⇒ Object

Raises:



11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/redis/cluster/node_loader.rb', line 11

def load_flags(nodes)
  info = {}

  nodes.each do |node|
    info = fetch_node_info(node)
    info.empty? ? next : break
  end

  return info unless info.empty?

  raise CannotConnectError, 'Redis client could not connect to any cluster nodes'
end