Class: Nucleon::Plugin::Agent

Inherits:
Object
  • Object
show all
Defined in:
lib/core/plugin/agent.rb

Instance Method Summary collapse

Instance Method Details

#agent_configObject




36
37
# File 'lib/core/plugin/agent.rb', line 36

def agent_config
end

#configureObject


Property accessor / modifiers



13
14
15
16
17
18
# File 'lib/core/plugin/agent.rb', line 13

def configure
  super do
    yield if block_given?
    agent_config
  end
end

#execute(use_network = true, &code) ⇒ Object


Operations



42
43
44
45
46
47
48
49
# File 'lib/core/plugin/agent.rb', line 42

def execute(use_network = true, &code)
  super do |node|
    ensure_network do
      daemonize(node)
      yield node
    end
  end
end

#helpObject




22
23
24
25
# File 'lib/core/plugin/agent.rb', line 22

def help
  # TODO:  Localization
  'AGENT ' + super
end

#pidObject


Settings



30
31
32
# File 'lib/core/plugin/agent.rb', line 30

def pid
  settings[:pid]
end