Class: OodCore::Job::Adapters::Kubernetes::Resources::TCPProbe
- Inherits:
-
Object
- Object
- OodCore::Job::Adapters::Kubernetes::Resources::TCPProbe
- Defined in:
- lib/ood_core/job/adapters/kubernetes/resources.rb
Overview
Utility class for kuberenetes probe settings.
Instance Attribute Summary collapse
-
#failure_threshold ⇒ Object
Returns the value of attribute failure_threshold.
-
#initial_delay_seconds ⇒ Object
Returns the value of attribute initial_delay_seconds.
-
#period_seconds ⇒ Object
Returns the value of attribute period_seconds.
-
#port ⇒ Object
Returns the value of attribute port.
Instance Method Summary collapse
-
#initialize(port, data) ⇒ TCPProbe
constructor
A new instance of TCPProbe.
- #to_h ⇒ Object
Constructor Details
#initialize(port, data) ⇒ TCPProbe
Returns a new instance of TCPProbe.
41 42 43 44 45 46 47 |
# File 'lib/ood_core/job/adapters/kubernetes/resources.rb', line 41 def initialize(port, data) data ||= {} @port = port @initial_delay_seconds = data[:initial_delay_seconds] || 2 @failure_threshold = data[:failure_threshold] || 5 @period_seconds = data[:period_seconds] || 5 end |
Instance Attribute Details
#failure_threshold ⇒ Object
Returns the value of attribute failure_threshold.
39 40 41 |
# File 'lib/ood_core/job/adapters/kubernetes/resources.rb', line 39 def failure_threshold @failure_threshold end |
#initial_delay_seconds ⇒ Object
Returns the value of attribute initial_delay_seconds.
39 40 41 |
# File 'lib/ood_core/job/adapters/kubernetes/resources.rb', line 39 def initial_delay_seconds @initial_delay_seconds end |
#period_seconds ⇒ Object
Returns the value of attribute period_seconds.
39 40 41 |
# File 'lib/ood_core/job/adapters/kubernetes/resources.rb', line 39 def period_seconds @period_seconds end |
#port ⇒ Object
Returns the value of attribute port.
39 40 41 |
# File 'lib/ood_core/job/adapters/kubernetes/resources.rb', line 39 def port @port end |
Instance Method Details
#to_h ⇒ Object
49 50 51 52 53 54 55 56 |
# File 'lib/ood_core/job/adapters/kubernetes/resources.rb', line 49 def to_h { port: port, initial_delay_seconds: initial_delay_seconds, failure_threshold: failure_threshold, period_seconds: period_seconds, } end |