class MCollective::Agent::Discovery - mcollective version 2.12.5

# class MCollective::Agent::Discovery

`Discovery` agent for The Marionette Collective

Released under the Apache License, Version 2

### Attributes

meta[R]
timeout[R]

### Public Class Methods

new() click to toggle source

       # File lib/mcollective/agent/discovery.rb
     9 def initialize
    10   config = Config.instance.pluginconf
    11
    12   @timeout = 5
    13   @meta = {:license => "Apache License, Version 2",
    14            :author => "R.I.Pienaar <rip@devco.net>",
    15            :timeout => @timeout,
    16            :name => "Discovery Agent",
    17            :version => MCollective.version,
    18            :url => "https://docs.puppetlabs.com/mcollective/",
    19            :description => "MCollective Discovery Agent"}
    20 end

### Public Instance Methods

handlemsg(msg, stomp) click to toggle source

       # File lib/mcollective/agent/discovery.rb
    22 def handlemsg(msg, stomp)
    23   reply = "unknown request"
    24
    25   case msg[:body]
    26     when "ping"
    27       reply = "pong"
    28
    29     else
    30       reply = "Unknown Request: #{msg[:body]}"
    31   end
    32
    33   reply
    34 end