Class: Arkaan::Monitoring::Instance

Inherits:
Object
  • Object
show all
Includes:
Concerns::Activable, Concerns::Typable, Mongoid::Document, Mongoid::Timestamps
Defined in:
lib/arkaan/monitoring/instance.rb

Overview

An instance is one of the services, deployed on one server. A service may have many instances to balance the load between them all.

Author:

Instance Attribute Summary collapse

Instance Attribute Details

#actionsArkaan::Monitoring::Action

Returns the actions that has been performed on the service.

Returns:



28
# File 'lib/arkaan/monitoring/instance.rb', line 28

embeds_many :actions, class_name: 'Arkaan::Monitoring::Action', inverse_of: :instance

#dataHash

Returns the additional datas for this instance (for example for an Heroku instance it’s all the data provided by the API).

Returns:

  • (Hash)

    the additional datas for this instance (for example for an Heroku instance it’s all the data provided by the API)



19
# File 'lib/arkaan/monitoring/instance.rb', line 19

field :data, type: Hash, default: {}

#runningBoolean

Returns the running status of the instance, indicating if it can be used or not.

Returns:

  • (Boolean)

    the running status of the instance, indicating if it can be used or not.



16
# File 'lib/arkaan/monitoring/instance.rb', line 16

field :running, type: Boolean, default: false

#serviceArkaan::Monitoring::Service (readonly)

Returns the service this instance is linked to.

Returns:



25
# File 'lib/arkaan/monitoring/instance.rb', line 25

embedded_in :service, class_name: 'Arkaan::Monitoring::Service', inverse_of: :instances

#urlString

Returns the URL of the instance, where the requests will be issued.

Returns:

  • (String)

    the URL of the instance, where the requests will be issued.



13
# File 'lib/arkaan/monitoring/instance.rb', line 13

field :url, type: String