Class: Fluent::Plugin::GroongaInput::GQTPInput::Handler
- Inherits:
-
Object
- Object
- Fluent::Plugin::GroongaInput::GQTPInput::Handler
- Defined in:
- lib/fluent/plugin/in_groonga.rb
Instance Method Summary collapse
- #close ⇒ Object
-
#initialize(input, connection, repeater) ⇒ Handler
constructor
A new instance of Handler.
- #on_read(data) ⇒ Object
- #write_back(data) ⇒ Object
Constructor Details
#initialize(input, connection, repeater) ⇒ Handler
Returns a new instance of Handler.
412 413 414 415 416 417 418 |
# File 'lib/fluent/plugin/in_groonga.rb', line 412 def initialize(input, connection, repeater) @input = input @connection = connection @repeater = repeater @request_parser = RequestParser.new(@input) end |
Instance Method Details
#close ⇒ Object
429 430 431 432 |
# File 'lib/fluent/plugin/in_groonga.rb', line 429 def close @request_parser.close @connection.close end |
#on_read(data) ⇒ Object
420 421 422 423 |
# File 'lib/fluent/plugin/in_groonga.rb', line 420 def on_read(data) @request_parser << data @repeater.write(data) end |
#write_back(data) ⇒ Object
425 426 427 |
# File 'lib/fluent/plugin/in_groonga.rb', line 425 def write_back(data) @connection.write(data) end |