Class: Fluent::Test::Driver::TestEventRouter

Inherits:
Object
  • Object
show all
Defined in:
lib/fluent/test/driver/test_event_router.rb

Instance Method Summary collapse

Constructor Details

#initialize(driver) ⇒ TestEventRouter

Returns a new instance of TestEventRouter.



23
24
25
# File 'lib/fluent/test/driver/test_event_router.rb', line 23

def initialize(driver)
  @driver = driver
end

Instance Method Details

#emit(tag, time, record) ⇒ Object



27
28
29
# File 'lib/fluent/test/driver/test_event_router.rb', line 27

def emit(tag, time, record)
  @driver.emit_event_stream(tag, OneEventStream.new(time, record))
end

#emit_array(tag, array) ⇒ Object



31
32
33
# File 'lib/fluent/test/driver/test_event_router.rb', line 31

def emit_array(tag, array)
  @driver.emit_event_stream(tag, ArrayEventStream.new(array))
end

#emit_error_event(tag, time, record, error) ⇒ Object



39
40
41
# File 'lib/fluent/test/driver/test_event_router.rb', line 39

def emit_error_event(tag, time, record, error)
  @driver.emit_error_event(tag, time, record, error)
end

#emit_stream(tag, es) ⇒ Object



35
36
37
# File 'lib/fluent/test/driver/test_event_router.rb', line 35

def emit_stream(tag, es)
  @driver.emit_event_stream(tag, es)
end