Class: Puppet::Util::Instrumentation::IndirectionProbe
- Inherits:
-
Object
- Object
- Puppet::Util::Instrumentation::IndirectionProbe
show all
- Extended by:
- Indirector
- Defined in:
- lib/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
Returns a new instance of IndirectionProbe.
14
15
16
|
# File 'lib/puppet/util/instrumentation/indirection_probe.rb', line 14
def initialize(probe_name)
@probe_name = probe_name
end
|
Instance Attribute Details
#probe_name ⇒ Object
12
13
14
|
# File 'lib/puppet/util/instrumentation/indirection_probe.rb', line 12
def probe_name
@probe_name
end
|
Class Method Details
.from_data_hash(data) ⇒ Object
33
34
35
|
# File 'lib/puppet/util/instrumentation/indirection_probe.rb', line 33
def self.from_data_hash(data)
self.new(data["name"])
end
|
.from_pson(data) ⇒ Object
37
38
39
40
|
# File 'lib/puppet/util/instrumentation/indirection_probe.rb', line 37
def self.from_pson(data)
Puppet.deprecation_warning("from_pson is being removed in favour of from_data_hash.")
self.from_data_hash(data)
end
|
Instance Method Details
#to_data_hash ⇒ Object
18
19
20
|
# File 'lib/puppet/util/instrumentation/indirection_probe.rb', line 18
def to_data_hash
{ :name => probe_name }
end
|
#to_pson(*args) ⇒ Object
29
30
31
|
# File 'lib/puppet/util/instrumentation/indirection_probe.rb', line 29
def to_pson(*args)
to_pson_data_hash.to_pson(*args)
end
|
#to_pson_data_hash ⇒ Object
22
23
24
25
26
27
|
# File 'lib/puppet/util/instrumentation/indirection_probe.rb', line 22
def to_pson_data_hash
{
:document_type => "Puppet::Util::Instrumentation::IndirectionProbe",
:data => to_data_hash,
}
end
|