Class: Fluent::GroongaInput::GQTPInput::Handler

Inherits:
Coolio::Socket
  • Object
show all
Defined in:
lib/fluent/plugin/in_groonga.rb

Instance Method Summary collapse

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_closeObject



445
446
447
# File 'lib/fluent/plugin/in_groonga.rb', line 445

def on_close
  @parser.close
end

#on_connectObject



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