Class: Octopus::SlaveGroup

Inherits:
Object
  • Object
show all
Defined in:
lib/octopus/slave_group.rb

Instance Method Summary collapse

Constructor Details

#initialize(slaves) ⇒ SlaveGroup

Returns a new instance of SlaveGroup.



3
4
5
6
7
# File 'lib/octopus/slave_group.rb', line 3

def initialize(slaves)
  slaves = HashWithIndifferentAccess.new(slaves)
  slaves_list = slaves.values
  @load_balancer = Octopus::LoadBalancing::RoundRobin.new(slaves_list)
end

Instance Method Details

#nextObject



9
10
11
# File 'lib/octopus/slave_group.rb', line 9

def next
  @load_balancer.next
end