Class: Coverband::Adapters::PersistentService

Inherits:
Service
  • Object
show all
Defined in:
lib/coverband-service-client.rb

Instance Attribute Summary collapse

Attributes inherited from Service

#coverband_url, #hostname, #pid, #process_type, #runtime_env

Instance Method Summary collapse

Methods inherited from Service

#api_key, #clear!, #clear_file!, #coverage, #initialize_stats, #logger, #raw_store, #report_timing, #save_report, #size

Constructor Details

#initialize(coverband_url, opts = {}) ⇒ PersistentService

Returns a new instance of PersistentService.



211
212
213
214
# File 'lib/coverband-service-client.rb', line 211

def initialize(coverband_url, opts = {})
  super
  initiate_http
end

Instance Attribute Details

#httpObject (readonly)

Returns the value of attribute http.



209
210
211
# File 'lib/coverband-service-client.rb', line 209

def http
  @http
end

#statsObject (readonly)

Returns the value of attribute stats.



209
210
211
# File 'lib/coverband-service-client.rb', line 209

def stats
  @stats
end

Instance Method Details



216
217
218
# File 'lib/coverband-service-client.rb', line 216

def recommended_timeout
  puts Net::HTTP::Persistent.detect_idle_timeout URI("#{coverband_url}/api/collector")
end