Class: Virtuaservices::Monitoring::Instance

Inherits:
Object
  • Object
show all
Includes:
Mongoid::Document, Mongoid::Timestamps, Concerns::Activable, Concerns::Typable
Defined in:
lib/virtuaservices/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

#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/virtuaservices/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/virtuaservices/monitoring/instance.rb', line 16

field :running, type: Boolean, default: false

#serviceVirtuaservices::Monitoring::Service (readonly)

Returns the service this instance is linked to.

Returns:



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

embedded_in :service, class_name: 'Virtuaservices::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/virtuaservices/monitoring/instance.rb', line 13

field :url, type: String