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.
413 414 415 416 417 418 419 |
# File 'lib/fluent/plugin/in_groonga.rb', line 413 def initialize(input, connection, repeater) @input = input @connection = connection @repeater = repeater @request_parser = RequestParser.new(@input) end |
Instance Method Details
#close ⇒ Object
430 431 432 433 |
# File 'lib/fluent/plugin/in_groonga.rb', line 430 def close @request_parser.close @connection.close end |
#on_read(data) ⇒ Object
421 422 423 424 |
# File 'lib/fluent/plugin/in_groonga.rb', line 421 def on_read(data) @request_parser << data @repeater.write(data) end |
#write_back(data) ⇒ Object
426 427 428 |
# File 'lib/fluent/plugin/in_groonga.rb', line 426 def write_back(data) @connection.write(data) end |