module Fluent::PluginHelper::Counter
Attributes
_counter_client[R]
Public Class Methods
new()
click to toggle source
Calls superclass method
# File lib/fluent/plugin_helper/counter.rb, line 35 def initialize super @_counter_client = nil end
Public Instance Methods
counter_client_create(scope:, loop: Coolio::Loop.new)
click to toggle source
# File lib/fluent/plugin_helper/counter.rb, line 23 def counter_client_create(scope:, loop: Coolio::Loop.new) client_conf = system_config.counter_client raise Fluent::ConfigError, '<counter_client> is required in <system>' unless client_conf counter_client = Fluent::Counter::Client.new(loop, port: client_conf.port, host: client_conf.host, log: log, timeout: client_conf.timeout) counter_client.start counter_client.establish(scope) @_counter_client = counter_client counter_client end
stop()
click to toggle source
Calls superclass method
# File lib/fluent/plugin_helper/counter.rb, line 40 def stop super @_counter_client.stop end
terminate()
click to toggle source
Calls superclass method
# File lib/fluent/plugin_helper/counter.rb, line 45 def terminate @_counter_client = nil super end