Class: Puppet::Util::Instrumentation::IndirectionProbe

Inherits:
Object
  • Object
show all
Extended by:
Indirector
Defined in:
lib/vendor/puppet/util/instrumentation/indirection_probe.rb

Overview

We need to use a class other than Probe for the indirector because the Indirection class might declare some probes, and this would be a huge unbreakable dependency cycle.

Constant Summary

Constants included from Indirector

Indirector::BadNameRegexp

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Indirector

configure_routes, indirects

Constructor Details

#initialize(probe_name) ⇒ IndirectionProbe

Returns a new instance of IndirectionProbe.



14
15
16
# File 'lib/vendor/puppet/util/instrumentation/indirection_probe.rb', line 14

def initialize(probe_name)
  @probe_name = probe_name
end

Instance Attribute Details

#probe_nameObject (readonly)

Returns the value of attribute probe_name.



12
13
14
# File 'lib/vendor/puppet/util/instrumentation/indirection_probe.rb', line 12

def probe_name
  @probe_name
end

Class Method Details

.from_pson(data) ⇒ Object



26
27
28
# File 'lib/vendor/puppet/util/instrumentation/indirection_probe.rb', line 26

def self.from_pson(data)
  self.new(data["name"])
end

Instance Method Details

#to_pson(*args) ⇒ Object



18
19
20
21
22
23
24
# File 'lib/vendor/puppet/util/instrumentation/indirection_probe.rb', line 18

def to_pson(*args)
  result = {
    :document_type => "Puppet::Util::Instrumentation::IndirectionProbe",
    :data => { :name => probe_name }
  }
  result.to_pson(*args)
end