Class: RoutesAlerts::RouteInfo
- Inherits:
-
Object
- Object
- RoutesAlerts::RouteInfo
- Defined in:
- lib/routes_alerts/route_info.rb
Instance Attribute Summary collapse
-
#actions ⇒ Object
readonly
Returns the value of attribute actions.
-
#alarm_period ⇒ Object
readonly
Returns the value of attribute alarm_period.
-
#log_group_name ⇒ Object
readonly
Returns the value of attribute log_group_name.
-
#max_duration ⇒ Object
readonly
Returns the value of attribute max_duration.
-
#method ⇒ Object
readonly
Returns the value of attribute method.
-
#metrics ⇒ Object
readonly
Returns the value of attribute metrics.
-
#min_count ⇒ Object
readonly
Returns the value of attribute min_count.
-
#namespace ⇒ Object
readonly
Returns the value of attribute namespace.
-
#number_of_datapoints ⇒ Object
readonly
Returns the value of attribute number_of_datapoints.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
-
#prefix ⇒ Object
readonly
Returns the value of attribute prefix.
-
#success_rate ⇒ Object
readonly
Returns the value of attribute success_rate.
Instance Method Summary collapse
-
#initialize(path:, method:, max_duration:, min_count:, success_rate:, alarm_period:, number_of_datapoints:, metrics:, namespace:, log_group_name:, actions:, prefix: "") ⇒ RouteInfo
constructor
A new instance of RouteInfo.
Constructor Details
#initialize(path:, method:, max_duration:, min_count:, success_rate:, alarm_period:, number_of_datapoints:, metrics:, namespace:, log_group_name:, actions:, prefix: "") ⇒ RouteInfo
Returns a new instance of RouteInfo.
7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/routes_alerts/route_info.rb', line 7 def initialize(path:, method:, max_duration:, min_count:, success_rate:, alarm_period:, number_of_datapoints:, metrics:, namespace:, log_group_name:, actions:, prefix: "") @path = path.to_s @method = method.to_s.upcase @max_duration = max_duration.to_f @min_count = min_count.to_i @success_rate = success_rate.to_f @alarm_period = alarm_period.to_i @number_of_datapoints = number_of_datapoints.to_i @metrics = metrics @namespace = namespace.to_s @log_group_name = log_group_name.to_s @actions = actions || [] @prefix = prefix.to_s end |
Instance Attribute Details
#actions ⇒ Object (readonly)
Returns the value of attribute actions.
3 4 5 |
# File 'lib/routes_alerts/route_info.rb', line 3 def actions @actions end |
#alarm_period ⇒ Object (readonly)
Returns the value of attribute alarm_period.
3 4 5 |
# File 'lib/routes_alerts/route_info.rb', line 3 def alarm_period @alarm_period end |
#log_group_name ⇒ Object (readonly)
Returns the value of attribute log_group_name.
3 4 5 |
# File 'lib/routes_alerts/route_info.rb', line 3 def log_group_name @log_group_name end |
#max_duration ⇒ Object (readonly)
Returns the value of attribute max_duration.
3 4 5 |
# File 'lib/routes_alerts/route_info.rb', line 3 def max_duration @max_duration end |
#method ⇒ Object (readonly)
Returns the value of attribute method.
3 4 5 |
# File 'lib/routes_alerts/route_info.rb', line 3 def method @method end |
#metrics ⇒ Object (readonly)
Returns the value of attribute metrics.
3 4 5 |
# File 'lib/routes_alerts/route_info.rb', line 3 def metrics @metrics end |
#min_count ⇒ Object (readonly)
Returns the value of attribute min_count.
3 4 5 |
# File 'lib/routes_alerts/route_info.rb', line 3 def min_count @min_count end |
#namespace ⇒ Object (readonly)
Returns the value of attribute namespace.
3 4 5 |
# File 'lib/routes_alerts/route_info.rb', line 3 def namespace @namespace end |
#number_of_datapoints ⇒ Object (readonly)
Returns the value of attribute number_of_datapoints.
3 4 5 |
# File 'lib/routes_alerts/route_info.rb', line 3 def number_of_datapoints @number_of_datapoints end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
3 4 5 |
# File 'lib/routes_alerts/route_info.rb', line 3 def path @path end |
#prefix ⇒ Object (readonly)
Returns the value of attribute prefix.
3 4 5 |
# File 'lib/routes_alerts/route_info.rb', line 3 def prefix @prefix end |
#success_rate ⇒ Object (readonly)
Returns the value of attribute success_rate.
3 4 5 |
# File 'lib/routes_alerts/route_info.rb', line 3 def success_rate @success_rate end |