Module: EY::Stonith
- Defined in:
- lib/ey_stonith.rb,
lib/ey_stonith/config.rb,
lib/ey_stonith/history.rb,
lib/ey_stonith/rackapp.rb,
lib/ey_stonith/commands.rb,
lib/ey_stonith/awsm_notifier.rb,
lib/ey_stonith/commands/cron.rb,
lib/ey_stonith/commands/help.rb,
lib/ey_stonith/commands/info.rb,
lib/ey_stonith/commands/stop.rb,
lib/ey_stonith/commands/check.rb,
lib/ey_stonith/commands/claim.rb,
lib/ey_stonith/commands/reset.rb,
lib/ey_stonith/commands/notify.rb,
lib/ey_stonith/commands/resume.rb,
lib/ey_stonith/commands/status.rb,
lib/ey_stonith/commands/abstract.rb,
lib/ey_stonith/commands/commands.rb,
lib/ey_stonith/commands/takeover.rb,
lib/ey_stonith/commands/not_found.rb
Defined Under Namespace
Modules: Commands
Classes: AwsmNotifier, Config, Error, History, Rackapp
Constant Summary
collapse
- HEALTH_PATH =
'/health'
- TAKEOVER_PATH =
'/takeover'
- NOTIFY_PATH =
'/notify'
Class Attribute Summary collapse
Class Method Summary
collapse
Class Attribute Details
.callback_module ⇒ Object
Returns the value of attribute callback_module.
48
49
50
|
# File 'lib/ey_stonith.rb', line 48
def callback_module
@callback_module
end
|
Class Method Details
.healthy? ⇒ Boolean
30
|
# File 'lib/ey_stonith.rb', line 30
def self.healthy?() callback_module.healthy? end
|
.log_to(io) ⇒ Object
20
21
22
23
24
|
# File 'lib/ey_stonith.rb', line 20
def self.log_to(io)
@@logger = Logger.new io
logger.progname = ENV['CRON'] ? "(cron)" : "(#{`whoami`.chomp})"
logger
end
|
.logger ⇒ Object
26
|
# File 'lib/ey_stonith.rb', line 26
def self.logger() @@logger end
|
.notify(label, monitor_host) ⇒ Object
36
37
38
|
# File 'lib/ey_stonith.rb', line 36
def self.notify(label, monitor_host)
callback_module.notify label, monitor_host
end
|
.takeover(label) ⇒ Object
32
33
34
|
# File 'lib/ey_stonith.rb', line 32
def self.takeover(label)
callback_module.takeover label
end
|
.token_for(label) ⇒ Object
44
45
46
|
# File 'lib/ey_stonith.rb', line 44
def self.token_for(label)
callback_module.token_for label
end
|
.valid?(label, token) ⇒ Boolean
40
41
42
|
# File 'lib/ey_stonith.rb', line 40
def self.valid?(label, token)
token_for(label) == token
end
|