Class: RoutesAlerts::RouteInfo

Inherits:
Object
  • Object
show all
Defined in:
lib/routes_alerts/route_info.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#actionsObject (readonly)

Returns the value of attribute actions.



3
4
5
# File 'lib/routes_alerts/route_info.rb', line 3

def actions
  @actions
end

#alarm_periodObject (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_nameObject (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_durationObject (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

#methodObject (readonly)

Returns the value of attribute method.



3
4
5
# File 'lib/routes_alerts/route_info.rb', line 3

def method
  @method
end

#metricsObject (readonly)

Returns the value of attribute metrics.



3
4
5
# File 'lib/routes_alerts/route_info.rb', line 3

def metrics
  @metrics
end

#min_countObject (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

#namespaceObject (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_datapointsObject (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

#pathObject (readonly)

Returns the value of attribute path.



3
4
5
# File 'lib/routes_alerts/route_info.rb', line 3

def path
  @path
end

#prefixObject (readonly)

Returns the value of attribute prefix.



3
4
5
# File 'lib/routes_alerts/route_info.rb', line 3

def prefix
  @prefix
end

#success_rateObject (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