Class: Fluent::DebugAgentInput

Inherits:
Input
  • Object
show all
Defined in:
lib/fluent/plugin/in_debug_agent.rb

Instance Attribute Summary

Attributes included from Configurable

#config

Instance Method Summary collapse

Methods included from PluginId

#plugin_id, #require_id

Methods included from Configurable

included

Constructor Details

#initializeDebugAgentInput

Returns a new instance of DebugAgentInput.



24
25
26
27
# File 'lib/fluent/plugin/in_debug_agent.rb', line 24

def initialize
  require 'drb/drb'
  super
end

Instance Method Details

#configure(conf) ⇒ Object



35
36
37
# File 'lib/fluent/plugin/in_debug_agent.rb', line 35

def configure(conf)
  super
end

#shutdownObject



51
52
53
# File 'lib/fluent/plugin/in_debug_agent.rb', line 51

def shutdown
  @server.stop_service if @server
end

#startObject



39
40
41
42
43
44
45
46
47
48
49
# File 'lib/fluent/plugin/in_debug_agent.rb', line 39

def start
  if @unix_path
    require 'drb/unix'
    uri = "drbunix:#{@unix_path}"
  else
    uri = "druby://#{@bind}:#{@port}"
  end
  $log.info "listening dRuby", :uri => uri, :object => @object
  obj = eval(@object)
  @server = DRb::DRbServer.new(uri, obj)
end