Class: RubyScriptExporter::Probe::Builder

Inherits:
Object
  • Object
show all
Defined in:
lib/ruby_script_exporter/probe.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, service) ⇒ Builder

Returns a new instance of Builder.



81
82
83
# File 'lib/ruby_script_exporter/probe.rb', line 81

def initialize(name, service)
  @probe = Probe.new(name, service)
end

Instance Attribute Details

#probeObject

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