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
72 73 74 |
# File 'lib/kumonos/clusters.rb', line 72 def base_ejection_time_ms @base_ejection_time_ms end |
#consecutive_5xx ⇒ Object
Returns the value of attribute consecutive_5xx
72 73 74 |
# File 'lib/kumonos/clusters.rb', line 72 def consecutive_5xx @consecutive_5xx end |
#consecutive_gateway_failure ⇒ Object
Returns the value of attribute consecutive_gateway_failure
72 73 74 |
# File 'lib/kumonos/clusters.rb', line 72 def consecutive_gateway_failure @consecutive_gateway_failure end |
#enforcing_consecutive_5xx ⇒ Object
Returns the value of attribute enforcing_consecutive_5xx
72 73 74 |
# File 'lib/kumonos/clusters.rb', line 72 def enforcing_consecutive_5xx @enforcing_consecutive_5xx end |
#enforcing_consecutive_gateway_failure ⇒ Object
Returns the value of attribute enforcing_consecutive_gateway_failure
72 73 74 |
# File 'lib/kumonos/clusters.rb', line 72 def enforcing_consecutive_gateway_failure @enforcing_consecutive_gateway_failure end |
#enforcing_success_rate ⇒ Object
Returns the value of attribute enforcing_success_rate
72 73 74 |
# File 'lib/kumonos/clusters.rb', line 72 def enforcing_success_rate @enforcing_success_rate end |
#interval_ms ⇒ Object
Returns the value of attribute interval_ms
72 73 74 |
# File 'lib/kumonos/clusters.rb', line 72 def interval_ms @interval_ms end |
#max_ejection_percent ⇒ Object
Returns the value of attribute max_ejection_percent
72 73 74 |
# File 'lib/kumonos/clusters.rb', line 72 def max_ejection_percent @max_ejection_percent end |
#success_rate_minimum_hosts ⇒ Object
Returns the value of attribute success_rate_minimum_hosts
72 73 74 |
# File 'lib/kumonos/clusters.rb', line 72 def success_rate_minimum_hosts @success_rate_minimum_hosts end |
#success_rate_request_volume ⇒ Object
Returns the value of attribute success_rate_request_volume
72 73 74 |
# File 'lib/kumonos/clusters.rb', line 72 def success_rate_request_volume @success_rate_request_volume end |
#success_rate_stdev_factor ⇒ Object
Returns the value of attribute success_rate_stdev_factor
72 73 74 |
# File 'lib/kumonos/clusters.rb', line 72 def success_rate_stdev_factor @success_rate_stdev_factor end |
Class Method Details
.build(h) ⇒ Object
77 78 79 80 81 82 83 84 85 86 87 88 89 |
# File 'lib/kumonos/clusters.rb', line 77 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[e.to_sym] = h.delete(e) end raise "Fields are not allowed: #{h.keys}" unless h.keys.empty? new(**args) end |
Instance Method Details
#to_h ⇒ Object
92 93 94 |
# File 'lib/kumonos/clusters.rb', line 92 def to_h super.delete_if { |_, v| v.nil? } end |