Class: Fluent::GroongaOutput::NetworkClient
- Inherits:
-
BaseClient
- Object
- BaseClient
- Fluent::GroongaOutput::NetworkClient
- Includes:
- Configurable
- Defined in:
- lib/fluent/plugin/out_groonga.rb,
lib/fluent/plugin/out_groonga.rb
Instance Method Summary (collapse)
- - (Object) execute(name, arguments = {})
-
- (NetworkClient) initialize(protocol)
constructor
A new instance of NetworkClient.
- - (Object) shutdown
- - (Object) start
Constructor Details
- (NetworkClient) initialize(protocol)
Returns a new instance of NetworkClient
335 336 337 338 |
# File 'lib/fluent/plugin/out_groonga.rb', line 335 def initialize(protocol) super() @protocol = protocol end |
Instance Method Details
- (Object) execute(name, arguments = {})
349 350 351 352 353 354 355 356 |
# File 'lib/fluent/plugin/out_groonga.rb', line 349 def execute(name, arguments={}) command = build_command(name, arguments) @client ||= Groonga::Client.new(:protocol => @protocol, :host => @host, :port => @port, :backend => :synchronous) @client.execute(command) end |
- (Object) shutdown
344 345 346 347 |
# File 'lib/fluent/plugin/out_groonga.rb', line 344 def shutdown return if @client.nil? @client.close end |
- (Object) start
340 341 342 |
# File 'lib/fluent/plugin/out_groonga.rb', line 340 def start @client = nil end |