Class God::Metric
In: lib/god/metric.rb
Parent: Object

Metrics are responsible for holding watch conditions. An instance of Metric is yielded to blocks in the start_if, restart_if, stop_if, and transition methods.

Methods

condition   disable   enable   new  

Attributes

conditions  [RW]  The Array of Condition instances.
destination  [RW]  The destination Hash in canonical hash form. Example: { true => :up, false => :restart}
watch  [RW]  The Watch.

Public Class methods

Initialize a new Metric.

watch - The Watch. destination - The optional destination Hash in canonical hash form.

Public Instance methods

Public: Instantiate the given Condition and pass it into the optional block. Attributes of the condition must be set in the config file.

kind - The Symbol name of the condition.

Returns nothing.

Disable all of this Metric‘s conditions. Poll conditions will be halted and event/trigger conditions will be deregistered.

Returns nothing.

Enable all of this Metric‘s conditions. Poll conditions will be scheduled and event/trigger conditions will be registered.

Returns nothing.

[Validate]