Class: Easymon::RedisWriteableCheck

Inherits:
Object
  • Object
show all
Defined in:
lib/easymon/checks/redis_writeable_check.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(config) ⇒ RedisWriteableCheck

Returns a new instance of RedisWriteableCheck.



7
8
9
# File 'lib/easymon/checks/redis_writeable_check.rb', line 7

def initialize(config)
  self.config = config
end

Instance Attribute Details

#configObject

Returns the value of attribute config.



5
6
7
# File 'lib/easymon/checks/redis_writeable_check.rb', line 5

def config
  @config
end

Instance Method Details

#checkObject



11
12
13
14
15
16
# File 'lib/easymon/checks/redis_writeable_check.rb', line 11

def check
  check_status = redis_writeable?
  message = check_status ? "Writeable" : "Read Only"

  [check_status, message]
end