Class: Deadpool::Monitor::Base
- Inherits:
-
Object
- Object
- Deadpool::Monitor::Base
show all
- Defined in:
- lib/deadpool/monitor/base.rb
Instance Attribute Summary collapse
Instance Method Summary
collapse
Constructor Details
#initialize(config, monitor_config, logger) ⇒ Base
Returns a new instance of Base.
6
7
8
|
# File 'lib/deadpool/monitor/base.rb', line 6
def initialize(config, monitor_config, logger)
@config, @monitor_config, @logger = config, monitor_config, logger
end
|
Instance Attribute Details
#logger ⇒ Object
Returns the value of attribute logger.
4
5
6
|
# File 'lib/deadpool/monitor/base.rb', line 4
def logger
@logger
end
|
Instance Method Details
#primary_ok? ⇒ Boolean
10
11
12
|
# File 'lib/deadpool/monitor/base.rb', line 10
def primary_ok?
raise NotImplementedError, "primary_ok? is not implemented"
end
|
#secondary_ok? ⇒ Boolean
14
15
16
|
# File 'lib/deadpool/monitor/base.rb', line 14
def secondary_ok?
raise NotImplementedError, "secondary_ok? is not implemented"
end
|
#state ⇒ Object
23
24
25
|
# File 'lib/deadpool/monitor/base.rb', line 23
def state
@state ||= Deadpool::State.new name, self.class
end
|
#system_check ⇒ Object
18
19
20
21
|
# File 'lib/deadpool/monitor/base.rb', line 18
def system_check
update_state
take_snapshot
end
|