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
Returns a new instance of Handler.
264 265 266 267 |
# File 'lib/fluent/plugin/in_groonga.rb', line 264 def initialize(socket, input) super(socket) @input = input end |
Instance Method Details
#on_close ⇒ Object
279 280 281 |
# File 'lib/fluent/plugin/in_groonga.rb', line 279 def on_close @parser.close end |
#on_connect ⇒ Object
269 270 271 272 |
# File 'lib/fluent/plugin/in_groonga.rb', line 269 def on_connect @parser = Parser.new(@input) @repeater = @input.create_repeater(self) end |
#on_read(data) ⇒ Object
274 275 276 277 |
# File 'lib/fluent/plugin/in_groonga.rb', line 274 def on_read(data) @parser << data @repeater.write(data) end |