Class: Influxdb::Api::Client::Selector::RoundRobin

Inherits:
Base
  • Object
show all
Defined in:
lib/influxdb/api/client/selector.rb

Instance Method Summary collapse

Instance Method Details

#select_from(connections) ⇒ Object



18
19
20
21
22
# File 'lib/influxdb/api/client/selector.rb', line 18

def select_from(connections)
  @current = @current.nil? ? 0 : @current + 1
  @current = 0 if @current >= connections.size
  connections[@current]
end