Class: Freno::Client::Requests::Check
- Inherits:
-
Freno::Client::Request
- Object
- Freno::Client::Request
- Freno::Client::Requests::Check
- Defined in:
- lib/freno/client/requests/check.rb
Direct Known Subclasses
Constant Summary
Constants included from Preconditions
Preconditions::PreconditionNotMet
Instance Attribute Summary
Attributes inherited from Freno::Client::Request
#args, #faraday, #options, #raise_on_timeout
Instance Method Summary collapse
-
#initialize(**kwargs) ⇒ Check
constructor
A new instance of Check.
Methods inherited from Freno::Client::Request
Methods included from Preconditions
Constructor Details
#initialize(**kwargs) ⇒ Check
Returns a new instance of Check.
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/freno/client/requests/check.rb', line 9 def initialize(**kwargs) super app = kwargs.fetch(:app) store_type = kwargs.fetch(:store_type) store_name = kwargs.fetch(:store_name) check do present app: app, store_type: store_type, store_name: store_name end # A low priority check is handled slightly differently by Freno. If # the p=low GET parameter is passed, the check will fail for any app # with failed checks within the last second. This failure is returned # quickly, without checking the underlying metric. params[:p] = "low" if [:low_priority] @path = "check/#{app}/#{store_type}/#{store_name}" end |