Class: LogStashLogger::Device::Balancer

Inherits:
Base
  • Object
show all
Defined in:
lib/logstash-logger/device/balancer.rb

Instance Attribute Summary collapse

Attributes inherited from Base

#io, #sync

Instance Method Summary collapse

Methods inherited from Base

#close, #flush, #to_io, #write

Constructor Details

#initialize(opts) ⇒ Balancer

Returns a new instance of Balancer.



6
7
8
9
10
11
# File 'lib/logstash-logger/device/balancer.rb', line 6

def initialize(opts)
  @io = self
  @devices = create_devices(opts[:outputs])
  self.class.delegate_to_all(:close, :flush)
  self.class.delegate_to_one(:write)
end

Instance Attribute Details

#devicesObject (readonly)

Returns the value of attribute devices.



4
5
6
# File 'lib/logstash-logger/device/balancer.rb', line 4

def devices
  @devices
end