Class: Fluent::DebugAgentInput
- Defined in:
- lib/fluent/plugin/in_debug_agent.rb
Constant Summary
Constants included from Configurable
Configurable::CONFIG_TYPE_REGISTRY
Instance Attribute Summary
Attributes inherited from Input
Attributes included from PluginLoggerMixin
Instance Method Summary collapse
- #configure(conf) ⇒ Object
-
#initialize ⇒ DebugAgentInput
constructor
A new instance of DebugAgentInput.
- #shutdown ⇒ Object
- #start ⇒ Object
Methods included from PluginLoggerMixin
Methods included from PluginId
Methods included from Configurable
#config, included, lookup_type, register_type
Constructor Details
#initialize ⇒ DebugAgentInput
Returns a new instance of DebugAgentInput.
23 24 25 26 27 |
# File 'lib/fluent/plugin/in_debug_agent.rb', line 23 def initialize require 'drb/drb' require 'fluent/plugin/file_util' super end |
Instance Method Details
#configure(conf) ⇒ Object
35 36 37 38 39 40 41 42 |
# File 'lib/fluent/plugin/in_debug_agent.rb', line 35 def configure(conf) super if @unix_path unless ::Fluent::FileUtil.writable?(@unix_path) raise ConfigError, "in_debug_agent: `#{@unix_path}` is not writable" end end end |
#shutdown ⇒ Object
56 57 58 |
# File 'lib/fluent/plugin/in_debug_agent.rb', line 56 def shutdown @server.stop_service if @server end |
#start ⇒ Object
44 45 46 47 48 49 50 51 52 53 54 |
# File 'lib/fluent/plugin/in_debug_agent.rb', line 44 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 |