Class: Fluent::GroongaInput::GQTPInput::Handler
- Inherits:
-
Coolio::Socket
- Object
- Coolio::Socket
- Fluent::GroongaInput::GQTPInput::Handler
- Defined in:
- lib/fluent/plugin/in_groonga.rb
Instance Method Summary collapse
-
#initialize(socket, input) ⇒ Handler
constructor
A new instance of Handler.
- #on_close ⇒ Object
- #on_connect ⇒ Object
- #on_read(data) ⇒ Object
Constructor Details
#initialize(socket, input) ⇒ Handler
430 431 432 433 |
# File 'lib/fluent/plugin/in_groonga.rb', line 430 def initialize(socket, input) super(socket) @input = input end |
Instance Method Details
#on_close ⇒ Object
445 446 447 |
# File 'lib/fluent/plugin/in_groonga.rb', line 445 def on_close @parser.close end |
#on_connect ⇒ Object
435 436 437 438 |
# File 'lib/fluent/plugin/in_groonga.rb', line 435 def on_connect @parser = Parser.new(@input) @repeater = @input.create_repeater(self) end |
#on_read(data) ⇒ Object
440 441 442 443 |
# File 'lib/fluent/plugin/in_groonga.rb', line 440 def on_read(data) @parser << data @repeater.write(data) end |