Class: Legate::Tools::WebhookTool
- Inherits:
-
Legate::Tool
- Object
- Legate::Tool
- Legate::Tools::WebhookTool
- Includes:
- Base::HttpClient
- Defined in:
- lib/legate/tools/webhook_tool.rb
Overview
A tool for sending outgoing webhook requests (HTTP POST) from an agent.
Constant Summary collapse
- BLOCKED_RANGES =
[ IPAddr.new('0.0.0.0/8'), IPAddr.new('100.64.0.0/10') ].freeze
- DNS_RESOLVE_TIMEOUT =
5
Instance Attribute Summary
Attributes included from Base::HttpClient
Attributes inherited from Legate::Tool
#description, #name, #parameters
Instance Method Summary collapse
-
#initialize(**options) ⇒ WebhookTool
constructor
Initializes the tool and the underlying HTTP client.
Methods included from Base::HttpClient
#http_delete, #http_get, #http_head, #http_post, #http_put
Methods inherited from Legate::Tool
define_metadata, #execute, inherited, #validate_and_coerce_params, #validate_params
Methods included from Legate::Tool::MetadataDsl
Constructor Details
#initialize(**options) ⇒ WebhookTool
Initializes the tool and the underlying HTTP client.
36 37 38 39 40 41 |
# File 'lib/legate/tools/webhook_tool.rb', line 36 def initialize(**) super(**) # Provide a dummy base_url, required by setup_http_client. # The actual target URL is provided absolute in perform_execution. setup_http_client(base_url: 'https://placeholder.invalid') end |