Class: RubyScriptExporter::Probe::Builder
- Inherits:
-
Object
- Object
- RubyScriptExporter::Probe::Builder
- Defined in:
- lib/ruby_script_exporter/probe.rb
Instance Attribute Summary collapse
-
#probe ⇒ Object
Returns the value of attribute probe.
Instance Method Summary collapse
- #cache_for(time) ⇒ Object
-
#initialize(name, service) ⇒ Builder
constructor
A new instance of Builder.
- #label(key, value) ⇒ Object
- #run(&block) ⇒ Object
- #timeout(timeout) ⇒ Object
Constructor Details
Instance Attribute Details
#probe ⇒ Object
Returns the value of attribute probe.
79 80 81 |
# File 'lib/ruby_script_exporter/probe.rb', line 79 def probe @probe end |
Instance Method Details
#cache_for(time) ⇒ Object
85 86 87 |
# File 'lib/ruby_script_exporter/probe.rb', line 85 def cache_for(time) @probe.cache_for = time end |
#label(key, value) ⇒ Object
93 94 95 |
# File 'lib/ruby_script_exporter/probe.rb', line 93 def label(key, value) @probe.labels[key] = value end |
#run(&block) ⇒ Object
97 98 99 |
# File 'lib/ruby_script_exporter/probe.rb', line 97 def run(&block) @probe.runner_proc = block end |
#timeout(timeout) ⇒ Object
89 90 91 |
# File 'lib/ruby_script_exporter/probe.rb', line 89 def timeout(timeout) @probe.timeout = timeout end |