Class: Fluent::GroongaOutput

Inherits:
BufferedOutput
  • Object
show all
Defined in:
lib/fluent/plugin/out_groonga.rb

Defined Under Namespace

Classes: BaseClient, CommandClient, Emitter, NetworkClient, Schema

Instance Method Summary collapse

Constructor Details

#initializeGroongaOutput

Returns a new instance of GroongaOutput.



28
29
30
# File 'lib/fluent/plugin/out_groonga.rb', line 28

def initialize
  super
end

Instance Method Details

#configure(conf) ⇒ Object



42
43
44
45
46
47
48
# File 'lib/fluent/plugin/out_groonga.rb', line 42

def configure(conf)
  super
  @client = create_client(@protocol)
  @client.configure(conf)

  @emitter = Emitter.new(@client, @table)
end

#format(tag, time, record) ⇒ Object



62
63
64
# File 'lib/fluent/plugin/out_groonga.rb', line 62

def format(tag, time, record)
  [tag, time, record].to_msgpack
end

#shutdownObject



56
57
58
59
60
# File 'lib/fluent/plugin/out_groonga.rb', line 56

def shutdown
  super
  @emitter.shutdown
  @client.shutdown
end

#startObject



50
51
52
53
54
# File 'lib/fluent/plugin/out_groonga.rb', line 50

def start
  super
  @client.start
  @emitter.start
end

#write(chunk) ⇒ Object



66
67
68
# File 'lib/fluent/plugin/out_groonga.rb', line 66

def write(chunk)
  @emitter.emit(chunk)
end