Module: Orchestration::Services::HealthcheckBase

Included in:
App::Healthcheck, Database::Healthcheck, Listener::Healthcheck, Mongo::Healthcheck, RabbitMQ::Healthcheck, Redis::Healthcheck
Defined in:
lib/orchestration/services/mixins/healthcheck_base.rb

Defined Under Namespace

Modules: ClassMethods

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#configurationObject (readonly)

Returns the value of attribute configuration.



6
7
8
# File 'lib/orchestration/services/mixins/healthcheck_base.rb', line 6

def configuration
  @configuration
end

Class Method Details

.included(base) ⇒ Object



8
9
10
# File 'lib/orchestration/services/mixins/healthcheck_base.rb', line 8

def self.included(base)
  base.extend(ClassMethods)
end

Instance Method Details

#initialize(env, service_name = nil, options = {}) ⇒ Object



38
39
40
41
42
# File 'lib/orchestration/services/mixins/healthcheck_base.rb', line 38

def initialize(env, service_name = nil, options = {})
  @options = options
  @options[:sidecar] = options[:sidecar] && !options[:sidecar].empty?
  @configuration = configuration_class.new(env, service_name, @options)
end

#service_nameObject



44
45
46
# File 'lib/orchestration/services/mixins/healthcheck_base.rb', line 44

def service_name
  @configuration.service_name
end