Class: Fusuma::Plugin::Inputs::AppmatcherInput
- Inherits:
-
Input
- Object
- Input
- Fusuma::Plugin::Inputs::AppmatcherInput
- Defined in:
- lib/fusuma/plugin/inputs/appmatcher_input.rb
Overview
Get active application’s name
Instance Method Summary collapse
-
#create_event(record:) ⇒ Event
TODO: use read_from_io.
- #io ⇒ Object
- #shutdown ⇒ Object
Instance Method Details
#create_event(record:) ⇒ Event
TODO: use read_from_io
30 31 32 33 34 35 36 37 |
# File 'lib/fusuma/plugin/inputs/appmatcher_input.rb', line 30 def create_event(record:) e = Events::Event.new( tag: tag, record: Events::Records::AppmatcherRecord.new(name: record) ) MultiLogger.debug(input_event: e) e end |
#io ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/fusuma/plugin/inputs/appmatcher_input.rb', line 10 def io return @io if instance_variable_defined?(:@io) @backend = Appmatcher.backend_klass.new @backend.watch_start # NOTE: Closing the parent process's pipe @backend.writer.close @io = @backend.reader end |
#shutdown ⇒ Object
22 23 24 25 |
# File 'lib/fusuma/plugin/inputs/appmatcher_input.rb', line 22 def shutdown # CustomProcess#shutdown @backend.shutdown end |