Class: Fluent::GroongaOutput
- Inherits:
-
BufferedOutput
- Object
- BufferedOutput
- Fluent::GroongaOutput
show all
- Defined in:
- lib/fluent/plugin/out_groonga.rb
Defined Under Namespace
Classes: BaseClient, CommandClient, Emitter, NetworkClient, Schema, TableDefinition, TablesCreator
Instance Method Summary
collapse
Constructor Details
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
80
81
82
83
84
85
86
87
88
89
90
91
|
# File 'lib/fluent/plugin/out_groonga.rb', line 80
def configure(conf)
super
@client = create_client(@protocol)
@client.configure(conf)
@schema = Schema.new(@client, @store_table, @mappings)
@emitter = Emitter.new(@client, @store_table, @schema)
@tables = @tables.collect do |table|
TableDefinition.new(table)
end
end
|
107
108
109
|
# File 'lib/fluent/plugin/out_groonga.rb', line 107
def format(tag, time, record)
[tag, time, record].to_msgpack
end
|
#shutdown ⇒ Object
101
102
103
104
105
|
# File 'lib/fluent/plugin/out_groonga.rb', line 101
def shutdown
super
@emitter.shutdown
@client.shutdown
end
|
#start ⇒ Object
93
94
95
96
97
98
99
|
# File 'lib/fluent/plugin/out_groonga.rb', line 93
def start
super
@client.start
@emitter.start
tables_creator = TablesCreator.new(@client, @tables)
tables_creator.create
end
|
#write(chunk) ⇒ Object
111
112
113
|
# File 'lib/fluent/plugin/out_groonga.rb', line 111
def write(chunk)
@emitter.emit(chunk)
end
|