Module: Fizzy::Hooks
- Included in:
- ChainHooks, LoggerHooks, NoopHooks
- Defined in:
- lib/fizzy/hooks.rb
Overview
Interface for observability hooks. Implement this to add logging, metrics, or tracing to HTTP requests.
Instance Method Summary collapse
-
#on_operation_end(info, result) ⇒ void
Called when a service operation completes (success or failure).
-
#on_operation_start(info) ⇒ void
Called when a service operation starts (e.g., boards.list, cards.create).
-
#on_paginate(url, page) ⇒ void
Called when pagination fetches the next page.
-
#on_request_end(info, result) ⇒ void
Called when an HTTP request completes (success or failure).
-
#on_request_start(info) ⇒ void
Called when an HTTP request starts.
-
#on_retry(info, attempt, error, delay) ⇒ void
Called when a request is retried.
Instance Method Details
#on_operation_end(info, result) ⇒ void
This method returns an undefined value.
Called when a service operation completes (success or failure).
33 34 35 |
# File 'lib/fizzy/hooks.rb', line 33 def on_operation_end(info, result) # Override in implementation end |
#on_operation_start(info) ⇒ void
This method returns an undefined value.
Called when a service operation starts (e.g., boards.list, cards.create).
25 26 27 |
# File 'lib/fizzy/hooks.rb', line 25 def on_operation_start(info) # Override in implementation end |
#on_paginate(url, page) ⇒ void
This method returns an undefined value.
Called when pagination fetches the next page.
66 67 68 |
# File 'lib/fizzy/hooks.rb', line 66 def on_paginate(url, page) # Override in implementation end |
#on_request_end(info, result) ⇒ void
This method returns an undefined value.
Called when an HTTP request completes (success or failure).
48 49 50 |
# File 'lib/fizzy/hooks.rb', line 48 def on_request_end(info, result) # Override in implementation end |
#on_request_start(info) ⇒ void
This method returns an undefined value.
Called when an HTTP request starts.
40 41 42 |
# File 'lib/fizzy/hooks.rb', line 40 def on_request_start(info) # Override in implementation end |
#on_retry(info, attempt, error, delay) ⇒ void
This method returns an undefined value.
Called when a request is retried.
58 59 60 |
# File 'lib/fizzy/hooks.rb', line 58 def on_retry(info, attempt, error, delay) # Override in implementation end |