Class: God::PollCondition
- Defined in:
- lib/god/condition.rb
Direct Known Subclasses
Conditions::Always, Conditions::Complex, Conditions::CpuUsage, Conditions::DegradingLambda, Conditions::DiskUsage, Conditions::FileMtime, Conditions::HttpResponseCode, Conditions::Lambda, Conditions::MemoryUsage, Conditions::Ping, Conditions::ProcessRunning, Conditions::Tries
Instance Attribute Summary collapse
-
#interval ⇒ Object
all poll conditions can specify a poll interval.
Attributes inherited from Condition
#info, #notify, #phase, #transition
Attributes inherited from Behavior
Instance Method Summary collapse
-
#after ⇒ Object
Override this method in your Conditions (optional).
-
#before ⇒ Object
Override this method in your Conditions (optional).
-
#test ⇒ Object
Override this method in your Conditions (mandatory).
Methods inherited from Condition
#friendly_name, generate, valid?
Methods inherited from Behavior
#after_restart, #after_start, #after_stop, #before_restart, #before_start, #before_stop, #friendly_name, generate, #valid?
Methods included from Configurable
#base_name, #complain, complain, #friendly_name, #prepare, #reset, #valid?
Instance Attribute Details
#interval ⇒ Object
all poll conditions can specify a poll interval
49 50 51 |
# File 'lib/god/condition.rb', line 49 def interval @interval end |
Instance Method Details
#after ⇒ Object
Override this method in your Conditions (optional)
64 65 |
# File 'lib/god/condition.rb', line 64 def after end |
#before ⇒ Object
Override this method in your Conditions (optional)
52 53 |
# File 'lib/god/condition.rb', line 52 def before end |
#test ⇒ Object
Override this method in your Conditions (mandatory)
Return true if the test passes (everything is ok) Return false otherwise
59 60 61 |
# File 'lib/god/condition.rb', line 59 def test raise AbstractMethodNotOverriddenError.new("PollCondition#test must be overridden in subclasses") end |