Wayfarer.Target
(wayfarer v0.6.2)
View Source
A GenServer responsible for performing health-checks against HTTP and HTTPS targets.
You should not need to create one of these yourself, instead use it via
Wayfarer.Server.
Options
:scheme- Required. The connection scheme. Valid values are :http, :https, :ws, :wss:port- Required. The TCP port to connect to. Valid values are between 1 and 65535:address(struct of typeIP.Address) - Required. The IP address to connect to.:module(module that adoptsWayfarer.Server) - Required. The proxy module this target is linked to.:name- An optional name for the target.:transport- The connection protocol. Valid values are :http1, :http2, :auto The default value is:auto.:health_checks(list ofkeyword/0) - The default value is[[name: nil, path: "/", hostname: nil, threshold: 3, connect_timeout: 5000, interval: 30000, method: :get, response_timeout: 500, success_codes: [200..299]]].
Summary
Functions
Returns a specification to start this module under a supervisor.
Return the current health status of the target
Types
@type key() :: {module(), :http | :https, IP.Address.t(), :socket.port_number()}
Functions
Returns a specification to start this module under a supervisor.
See Supervisor.
@spec current_status(pid() | key()) :: {:ok, Wayfarer.Router.health()} | {:error, any()}
Return the current health status of the target