Class: Kumonos::Clusters::OutlierDetection
- Inherits:
-
Struct
- Object
- Struct
- Kumonos::Clusters::OutlierDetection
- Defined in:
- lib/kumonos/clusters.rb
Instance Attribute Summary collapse
-
#base_ejection_time_ms ⇒ Object
Returns the value of attribute base_ejection_time_ms.
-
#consecutive_5xx ⇒ Object
Returns the value of attribute consecutive_5xx.
-
#consecutive_gateway_failure ⇒ Object
Returns the value of attribute consecutive_gateway_failure.
-
#enforcing_consecutive_5xx ⇒ Object
Returns the value of attribute enforcing_consecutive_5xx.
-
#enforcing_consecutive_gateway_failure ⇒ Object
Returns the value of attribute enforcing_consecutive_gateway_failure.
-
#enforcing_success_rate ⇒ Object
Returns the value of attribute enforcing_success_rate.
-
#interval_ms ⇒ Object
Returns the value of attribute interval_ms.
-
#max_ejection_percent ⇒ Object
Returns the value of attribute max_ejection_percent.
-
#success_rate_minimum_hosts ⇒ Object
Returns the value of attribute success_rate_minimum_hosts.
-
#success_rate_request_volume ⇒ Object
Returns the value of attribute success_rate_request_volume.
-
#success_rate_stdev_factor ⇒ Object
Returns the value of attribute success_rate_stdev_factor.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#base_ejection_time_ms ⇒ Object
Returns the value of attribute base_ejection_time_ms
82 83 84 |
# File 'lib/kumonos/clusters.rb', line 82 def base_ejection_time_ms @base_ejection_time_ms end |
#consecutive_5xx ⇒ Object
Returns the value of attribute consecutive_5xx
82 83 84 |
# File 'lib/kumonos/clusters.rb', line 82 def consecutive_5xx @consecutive_5xx end |
#consecutive_gateway_failure ⇒ Object
Returns the value of attribute consecutive_gateway_failure
82 83 84 |
# File 'lib/kumonos/clusters.rb', line 82 def consecutive_gateway_failure @consecutive_gateway_failure end |
#enforcing_consecutive_5xx ⇒ Object
Returns the value of attribute enforcing_consecutive_5xx
82 83 84 |
# File 'lib/kumonos/clusters.rb', line 82 def enforcing_consecutive_5xx @enforcing_consecutive_5xx end |
#enforcing_consecutive_gateway_failure ⇒ Object
Returns the value of attribute enforcing_consecutive_gateway_failure
82 83 84 |
# File 'lib/kumonos/clusters.rb', line 82 def enforcing_consecutive_gateway_failure @enforcing_consecutive_gateway_failure end |
#enforcing_success_rate ⇒ Object
Returns the value of attribute enforcing_success_rate
82 83 84 |
# File 'lib/kumonos/clusters.rb', line 82 def enforcing_success_rate @enforcing_success_rate end |
#interval_ms ⇒ Object
Returns the value of attribute interval_ms
82 83 84 |
# File 'lib/kumonos/clusters.rb', line 82 def interval_ms @interval_ms end |
#max_ejection_percent ⇒ Object
Returns the value of attribute max_ejection_percent
82 83 84 |
# File 'lib/kumonos/clusters.rb', line 82 def max_ejection_percent @max_ejection_percent end |
#success_rate_minimum_hosts ⇒ Object
Returns the value of attribute success_rate_minimum_hosts
82 83 84 |
# File 'lib/kumonos/clusters.rb', line 82 def success_rate_minimum_hosts @success_rate_minimum_hosts end |
#success_rate_request_volume ⇒ Object
Returns the value of attribute success_rate_request_volume
82 83 84 |
# File 'lib/kumonos/clusters.rb', line 82 def success_rate_request_volume @success_rate_request_volume end |
#success_rate_stdev_factor ⇒ Object
Returns the value of attribute success_rate_stdev_factor
82 83 84 |
# File 'lib/kumonos/clusters.rb', line 82 def success_rate_stdev_factor @success_rate_stdev_factor end |
Class Method Details
.build(h) ⇒ Object
86 87 88 89 90 91 92 93 94 95 96 97 98 |
# File 'lib/kumonos/clusters.rb', line 86 def build(h) return nil unless h args = [] %w[consecutive_5xx consecutive_gateway_failure interval_ms base_ejection_time_ms max_ejection_percent enforcing_consecutive_5xx enforcing_consecutive_gateway_failure enforcing_success_rate success_rate_minimum_hosts success_rate_request_volume success_rate_stdev_factor].each do |e| args << h.delete(e) end raise "Fields are not allowed: #{h.keys}" unless h.keys.empty? new(*args) end |
Instance Method Details
#to_h ⇒ Object
101 102 103 |
# File 'lib/kumonos/clusters.rb', line 101 def to_h super.delete_if { |_, v| v.nil? } end |