Class: Gitlab::Memory::Watchdog::MonitorState::Result
- Inherits:
-
Object
- Object
- Gitlab::Memory::Watchdog::MonitorState::Result
- Defined in:
- lib/gitlab/memory/watchdog/monitor_state.rb
Instance Attribute Summary collapse
-
#monitor_name ⇒ Object
readonly
Returns the value of attribute monitor_name.
-
#payload ⇒ Object
readonly
Returns the value of attribute payload.
Instance Method Summary collapse
-
#initialize(strikes_exceeded:, threshold_violated:, monitor_name:, payload:) ⇒ Result
constructor
A new instance of Result.
- #strikes_exceeded? ⇒ Boolean
- #threshold_violated? ⇒ Boolean
Constructor Details
#initialize(strikes_exceeded:, threshold_violated:, monitor_name:, payload:) ⇒ Result
Returns a new instance of Result.
10 11 12 13 14 15 |
# File 'lib/gitlab/memory/watchdog/monitor_state.rb', line 10 def initialize(strikes_exceeded:, threshold_violated:, monitor_name:, payload:) @strikes_exceeded = strikes_exceeded @threshold_violated = threshold_violated @monitor_name = monitor_name.to_s.to_sym @payload = payload end |
Instance Attribute Details
#monitor_name ⇒ Object (readonly)
Returns the value of attribute monitor_name.
8 9 10 |
# File 'lib/gitlab/memory/watchdog/monitor_state.rb', line 8 def monitor_name @monitor_name end |
#payload ⇒ Object (readonly)
Returns the value of attribute payload.
8 9 10 |
# File 'lib/gitlab/memory/watchdog/monitor_state.rb', line 8 def payload @payload end |
Instance Method Details
#strikes_exceeded? ⇒ Boolean
17 18 19 |
# File 'lib/gitlab/memory/watchdog/monitor_state.rb', line 17 def strikes_exceeded? @strikes_exceeded end |
#threshold_violated? ⇒ Boolean
21 22 23 |
# File 'lib/gitlab/memory/watchdog/monitor_state.rb', line 21 def threshold_violated? @threshold_violated end |