Module: Redis::Cluster::SlotLoader

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

Overview

Load and hashify slot info for Redis Cluster Client

Class Method Summary collapse

Class Method Details

.load(nodes) ⇒ Object

Raises:



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

def load(nodes)
  errors = nodes.map do |node|
    begin
      return fetch_slot_info(node)
    rescue CannotConnectError, ConnectionError, CommandError => error
      error
    end
  end

  raise InitialSetupError, errors
end