Module: Virtuatable::Builders::Helpers::Registration

Extended by:
ActiveSupport::Concern
Included in:
Base
Defined in:
lib/virtuatable/builders/helpers/registration.rb

Overview

Registers the service in the database by declaring it as a Arkaan::Monitoring::Service object, and declaring the instance.

Author:

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#serviceObject (readonly)

Returns the value of attribute service.



14
15
16
# File 'lib/virtuatable/builders/helpers/registration.rb', line 14

def service
  @service
end

Instance Method Details

#load_registration!Object

Registers the service in the micro-services registry (consisting in the arkaan_monitoring_services and arkaan_monitoring_instances collections)



22
23
24
25
26
27
# File 'lib/virtuatable/builders/helpers/registration.rb', line 22

def load_registration!
  @service = Arkaan::Monitoring::Service.find_or_create_by!(
    key: @name,
    path: "/#{@name}"
  )
end