Class: Fluent::GroongaOutput

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

Defined Under Namespace

Modules: DefinitionParseMethods Classes: BaseClient, CommandClient, Emitter, NetworkClient, Schema, TableDefinition, TablesCreator

Instance Method Summary (collapse)

Constructor Details

- (GroongaOutput) initialize

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

- (Object) configure(conf)



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

- (Object) format(tag, time, record)



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

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

- (Object) shutdown



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

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

- (Object) start



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

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

- (Object) write(chunk)



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

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