Class: Fluent::StreamInput
Overview
obsolete
Direct Known Subclasses
Defined Under Namespace
Classes: Handler
Instance Method Summary collapse
-
#initialize ⇒ StreamInput
constructor
A new instance of StreamInput.
-
#run ⇒ Object
def listen end.
- #shutdown ⇒ Object
- #start ⇒ Object
Constructor Details
#initialize ⇒ StreamInput
Returns a new instance of StreamInput.
31 32 33 34 35 |
# File 'lib/fluent/plugin/in_unix.rb', line 31 def initialize require 'socket' require 'yajl' super end |
Instance Method Details
#run ⇒ Object
def listen end
58 59 60 61 62 63 |
# File 'lib/fluent/plugin/in_unix.rb', line 58 def run @loop.run(@blocking_timeout) rescue log.error "unexpected error", error: $!.to_s log.error_backtrace end |
#shutdown ⇒ Object
46 47 48 49 50 51 52 53 |
# File 'lib/fluent/plugin/in_unix.rb', line 46 def shutdown @loop.watchers.each {|w| w.detach } @loop.stop @lsock.close @thread.join super end |
#start ⇒ Object
37 38 39 40 41 42 43 44 |
# File 'lib/fluent/plugin/in_unix.rb', line 37 def start super @loop = Coolio::Loop.new @lsock = listen @loop.attach(@lsock) @thread = Thread.new(&method(:run)) end |