wayfarer/documentation/dsls/DSL:-Wayfarer.cheatmd
James Harton a381ca4b34
All checks were successful
continuous-integration/drone/push Build is passing
feat: add proxying. (#7)
Reviewed-on: https://code.harton.nz/james/wayfarer/pulls/7
Co-authored-by: James Harton <james@harton.nz>
Co-committed-by: James Harton <james@harton.nz>
2023-11-19 17:56:07 +13:00

2142 lines
43 KiB
Text

<!--
This file was generated by Spark. Do not edit it by hand.
-->
# DSL: Wayfarer.Dsl
The Wayfarer DSL for defining static proxy configurations.
## DSL options
## wayfarer
* [config](#module-config)
* health_checks
* check
* host_patterns
* pattern
* listeners
* http
* https
* targets
* http
* health_checks
* check
* https
* health_checks
* check
* plug
---
### config
* health_checks
* check
* host_patterns
* pattern
* listeners
* http
* https
* targets
* http
* health_checks
* check
* https
* health_checks
* check
* plug
* `:name` (`t:String.t/0`) -
##### health_checks
* check
###### check
* `:name` - A unique name for the health check.
* `:method` - The HTTP method to use for the request. Valid values are :get, :head, :post, :put, :delete, :connect, :options, :trace, :patch The default value is `:get`.
* `:connect_timeout` (`t:pos_integer/0`) - Connection timeout in milliseconds The default value is `5000`.
* `:response_timeout` (`t:pos_integer/0`) - Response timeout in milliseconds The default value is `500`.
* `:hostname` - The HTTP hostname to use when sending the request. Defaults to the IP address.
* `:interval` (`t:pos_integer/0`) - Interval in milliseconds The default value is `30000`.
* `:threshold` (`t:pos_integer/0`) - Success threshold The default value is `3`.
* `:path` (`t:String.t/0`) - Path The default value is `"/"`.
* `:success_codes` - HTTP status codes which are considered successful. The default value is `[200..299]`.
##### host_patterns
* pattern
###### pattern
* `:pattern` (`t:String.t/0`) - Required. A hostname matching pattern.
##### listeners
* http
* https
###### http
* `:scheme` - Required. The listening protocol. Valid values are :http, :https
* `:address` - Required. The address of the interface to listen on.
* `:name` - A unique name for the listener (defaults to the URI).
* `:port` (`t:pos_integer/0`) - Required. The TCP port on which to listen for incoming connections.
* `:http_1_options` (`t:keyword/0`) - Options to configure the HTTP/1 stack in Bandit. The default value is `[]`.
* `:http_2_options` (`t:keyword/0`) - Options to configure the HTTP/2 stack in Bandit. The default value is `[]`.
* `:thousand_island_options` (`t:keyword/0`) - Possible options to configure a ThousandIsland server. The default value is `[]`.
* `:websocket_options` (`t:keyword/0`) - Options to configure the WebSocket stack in Bandit. The default value is `[]`.
###### https
* `:scheme` - Required. The listening protocol. Valid values are :http, :https
* `:address` - Required. The address of the interface to listen on.
* `:name` - A unique name for the listener (defaults to the URI).
* `:port` (`t:pos_integer/0`) - Required. The TCP port on which to listen for incoming connections.
* `:http_1_options` (`t:keyword/0`) - Options to configure the HTTP/1 stack in Bandit. The default value is `[]`.
* `:http_2_options` (`t:keyword/0`) - Options to configure the HTTP/2 stack in Bandit. The default value is `[]`.
* `:thousand_island_options` (`t:keyword/0`) - Possible options to configure a ThousandIsland server. The default value is `[]`.
* `:websocket_options` (`t:keyword/0`) - Options to configure the WebSocket stack in Bandit. The default value is `[]`.
* `:certfile` (`t:String.t/0`) - The path to a file containing the SSL certificate to use for this listener.
* `:keyfile` (`t:String.t/0`) - The path to a file containing the SSL key to use for this listener.
* `:cipher_suite` - Used to define a pre-selected set of ciphers, as described by `Plug.SSL.configure/1`. Valid values are nil, :strong, :compatible
##### targets
* http
* health_checks
* check
* https
* health_checks
* check
* plug
* `:algorithm` - The target selection algorithm. Valid values are :round_robin, :sticky The default value is `:round_robin`.
###### http
* health_checks
* check
* `:address` - Required. The address of the interface to listen on.
* `:name` - A unique name for the target (defaults to the URI).
* `:port` (`t:pos_integer/0`) - Required. The TCP port on which to listen for incoming connections.
####### health_checks
* check
######## check
* `:name` - A unique name for the health check.
* `:method` - The HTTP method to use for the request. Valid values are :get, :head, :post, :put, :delete, :connect, :options, :trace, :patch The default value is `:get`.
* `:connect_timeout` (`t:pos_integer/0`) - Connection timeout in milliseconds The default value is `5000`.
* `:response_timeout` (`t:pos_integer/0`) - Response timeout in milliseconds The default value is `500`.
* `:hostname` - The HTTP hostname to use when sending the request. Defaults to the IP address.
* `:interval` (`t:pos_integer/0`) - Interval in milliseconds The default value is `30000`.
* `:threshold` (`t:pos_integer/0`) - Success threshold The default value is `3`.
* `:path` (`t:String.t/0`) - Path The default value is `"/"`.
* `:success_codes` - HTTP status codes which are considered successful. The default value is `[200..299]`.
###### https
* health_checks
* check
* `:address` - Required. The address of the interface to listen on.
* `:name` - A unique name for the target (defaults to the URI).
* `:port` (`t:pos_integer/0`) - Required. The TCP port on which to listen for incoming connections.
####### health_checks
* check
######## check
* `:name` - A unique name for the health check.
* `:method` - The HTTP method to use for the request. Valid values are :get, :head, :post, :put, :delete, :connect, :options, :trace, :patch The default value is `:get`.
* `:connect_timeout` (`t:pos_integer/0`) - Connection timeout in milliseconds The default value is `5000`.
* `:response_timeout` (`t:pos_integer/0`) - Response timeout in milliseconds The default value is `500`.
* `:hostname` - The HTTP hostname to use when sending the request. Defaults to the IP address.
* `:interval` (`t:pos_integer/0`) - Interval in milliseconds The default value is `30000`.
* `:threshold` (`t:pos_integer/0`) - Success threshold The default value is `3`.
* `:path` (`t:String.t/0`) - Path The default value is `"/"`.
* `:success_codes` - HTTP status codes which are considered successful. The default value is `[200..299]`.
###### plug
* `:module` - Required. A plug which can handle requests.
## wayfarer
### Nested DSLs
* [config](#wayfarer-config)
* health_checks
* check
* host_patterns
* pattern
* listeners
* http
* https
* targets
* http
* health_checks
* check
* https
* health_checks
* check
* plug
## wayfarer.config
```elixir
config name \ nil
```
### Nested DSLs
* [health_checks](#wayfarer-config-health_checks)
* check
* [host_patterns](#wayfarer-config-host_patterns)
* pattern
* [listeners](#wayfarer-config-listeners)
* http
* https
* [targets](#wayfarer-config-targets)
* http
* health_checks
* check
* https
* health_checks
* check
* plug
### Arguments
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Default</th>
<th colspan=2>Docs</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left">
<a id="wayfarer-config-name" href="#wayfarer-config-name">
<span style="font-family: Inconsolata, Menlo, Courier, monospace;">
name
</span>
</a>
</td>
<td style="text-align: left">
<code class="inline">String.t</code>
</td>
<td style="text-align: left">
</td>
<td style="text-align: left" colspan=2>
</td>
</tr>
</tbody>
</table>
## wayfarer.config.health_checks
### Nested DSLs
* [check](#wayfarer-config-health_checks-check)
## wayfarer.config.health_checks.check
```elixir
check name \ nil
```
### Arguments
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Default</th>
<th colspan=2>Docs</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left">
<a id="wayfarer-config-health_checks-check-name" href="#wayfarer-config-health_checks-check-name">
<span style="font-family: Inconsolata, Menlo, Courier, monospace;">
name
</span>
</a>
</td>
<td style="text-align: left">
<code class="inline">String.t | nil</code>
</td>
<td style="text-align: left">
</td>
<td style="text-align: left" colspan=2>
A unique name for the health check.
</td>
</tr>
</tbody>
</table>
### Options
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Default</th>
<th colspan=2>Docs</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left">
<a id="wayfarer-config-health_checks-check-method" href="#wayfarer-config-health_checks-check-method">
<span style="font-family: Inconsolata, Menlo, Courier, monospace;">
method
</span>
</a>
</td>
<td style="text-align: left">
<code class="inline">:get | :head | :post | :put | :delete | :connect | :options | :trace | :patch</code>
</td>
<td style="text-align: left">
<code class="inline">:get</code>
</td>
<td style="text-align: left" colspan=2>
The HTTP method to use for the request.
</td>
</tr>
<tr>
<td style="text-align: left">
<a id="wayfarer-config-health_checks-check-connect_timeout" href="#wayfarer-config-health_checks-check-connect_timeout">
<span style="font-family: Inconsolata, Menlo, Courier, monospace;">
connect_timeout
</span>
</a>
</td>
<td style="text-align: left">
<code class="inline">pos_integer</code>
</td>
<td style="text-align: left">
<code class="inline">5000</code>
</td>
<td style="text-align: left" colspan=2>
Connection timeout in milliseconds
</td>
</tr>
<tr>
<td style="text-align: left">
<a id="wayfarer-config-health_checks-check-response_timeout" href="#wayfarer-config-health_checks-check-response_timeout">
<span style="font-family: Inconsolata, Menlo, Courier, monospace;">
response_timeout
</span>
</a>
</td>
<td style="text-align: left">
<code class="inline">pos_integer</code>
</td>
<td style="text-align: left">
<code class="inline">500</code>
</td>
<td style="text-align: left" colspan=2>
Response timeout in milliseconds
</td>
</tr>
<tr>
<td style="text-align: left">
<a id="wayfarer-config-health_checks-check-hostname" href="#wayfarer-config-health_checks-check-hostname">
<span style="font-family: Inconsolata, Menlo, Courier, monospace;">
hostname
</span>
</a>
</td>
<td style="text-align: left">
<code class="inline">nil | String.t</code>
</td>
<td style="text-align: left">
</td>
<td style="text-align: left" colspan=2>
The HTTP hostname to use when sending the request. Defaults to the IP address.
</td>
</tr>
<tr>
<td style="text-align: left">
<a id="wayfarer-config-health_checks-check-interval" href="#wayfarer-config-health_checks-check-interval">
<span style="font-family: Inconsolata, Menlo, Courier, monospace;">
interval
</span>
</a>
</td>
<td style="text-align: left">
<code class="inline">pos_integer</code>
</td>
<td style="text-align: left">
<code class="inline">30000</code>
</td>
<td style="text-align: left" colspan=2>
Interval in milliseconds
</td>
</tr>
<tr>
<td style="text-align: left">
<a id="wayfarer-config-health_checks-check-threshold" href="#wayfarer-config-health_checks-check-threshold">
<span style="font-family: Inconsolata, Menlo, Courier, monospace;">
threshold
</span>
</a>
</td>
<td style="text-align: left">
<code class="inline">pos_integer</code>
</td>
<td style="text-align: left">
<code class="inline">3</code>
</td>
<td style="text-align: left" colspan=2>
Success threshold
</td>
</tr>
<tr>
<td style="text-align: left">
<a id="wayfarer-config-health_checks-check-path" href="#wayfarer-config-health_checks-check-path">
<span style="font-family: Inconsolata, Menlo, Courier, monospace;">
path
</span>
</a>
</td>
<td style="text-align: left">
<code class="inline">String.t</code>
</td>
<td style="text-align: left">
<code class="inline">"/"</code>
</td>
<td style="text-align: left" colspan=2>
Path
</td>
</tr>
<tr>
<td style="text-align: left">
<a id="wayfarer-config-health_checks-check-success_codes" href="#wayfarer-config-health_checks-check-success_codes">
<span style="font-family: Inconsolata, Menlo, Courier, monospace;">
success_codes
</span>
</a>
</td>
<td style="text-align: left">
<code class="inline">list(Range) | Range</code>
</td>
<td style="text-align: left">
<code class="inline">[200..299]</code>
</td>
<td style="text-align: left" colspan=2>
HTTP status codes which are considered successful.
</td>
</tr>
</tbody>
</table>
### Introspection
Target: `Wayfarer.Dsl.HealthCheck`
### Introspection
Target: `Wayfarer.Dsl.HealthChecks`
## wayfarer.config.host_patterns
### Nested DSLs
* [pattern](#wayfarer-config-host_patterns-pattern)
## wayfarer.config.host_patterns.pattern
```elixir
pattern pattern
```
### Arguments
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Default</th>
<th colspan=2>Docs</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left">
<a id="wayfarer-config-host_patterns-pattern-pattern" href="#wayfarer-config-host_patterns-pattern-pattern">
<span style="font-family: Inconsolata, Menlo, Courier, monospace;">
pattern
</span>
</a>
<sup style="color: red">*</sup>
</td>
<td style="text-align: left">
<code class="inline">String.t</code>
</td>
<td style="text-align: left">
</td>
<td style="text-align: left" colspan=2>
A hostname matching pattern.
</td>
</tr>
</tbody>
</table>
### Introspection
Target: `Wayfarer.Dsl.HostPattern`
### Introspection
Target: `Wayfarer.Dsl.HostPatterns`
## wayfarer.config.listeners
### Nested DSLs
* [http](#wayfarer-config-listeners-http)
* [https](#wayfarer-config-listeners-https)
## wayfarer.config.listeners.http
```elixir
http address, port
```
### Arguments
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Default</th>
<th colspan=2>Docs</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left">
<a id="wayfarer-config-listeners-http-address" href="#wayfarer-config-listeners-http-address">
<span style="font-family: Inconsolata, Menlo, Courier, monospace;">
address
</span>
</a>
<sup style="color: red">*</sup>
</td>
<td style="text-align: left">
<code class="inline">IP.Address | String.t</code>
</td>
<td style="text-align: left">
</td>
<td style="text-align: left" colspan=2>
The address of the interface to listen on.
</td>
</tr>
<tr>
<td style="text-align: left">
<a id="wayfarer-config-listeners-http-port" href="#wayfarer-config-listeners-http-port">
<span style="font-family: Inconsolata, Menlo, Courier, monospace;">
port
</span>
</a>
<sup style="color: red">*</sup>
</td>
<td style="text-align: left">
<code class="inline">pos_integer</code>
</td>
<td style="text-align: left">
</td>
<td style="text-align: left" colspan=2>
The TCP port on which to listen for incoming connections.
</td>
</tr>
</tbody>
</table>
### Options
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Default</th>
<th colspan=2>Docs</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left">
<a id="wayfarer-config-listeners-http-scheme" href="#wayfarer-config-listeners-http-scheme">
<span style="font-family: Inconsolata, Menlo, Courier, monospace;">
scheme
</span>
</a>
<sup style="color: red">*</sup>
</td>
<td style="text-align: left">
<code class="inline">:http | :https</code>
</td>
<td style="text-align: left">
</td>
<td style="text-align: left" colspan=2>
The listening protocol.
</td>
</tr>
<tr>
<td style="text-align: left">
<a id="wayfarer-config-listeners-http-name" href="#wayfarer-config-listeners-http-name">
<span style="font-family: Inconsolata, Menlo, Courier, monospace;">
name
</span>
</a>
</td>
<td style="text-align: left">
<code class="inline">nil | String.t</code>
</td>
<td style="text-align: left">
</td>
<td style="text-align: left" colspan=2>
A unique name for the listener (defaults to the URI).
</td>
</tr>
<tr>
<td style="text-align: left">
<a id="wayfarer-config-listeners-http-http_1_options" href="#wayfarer-config-listeners-http-http_1_options">
<span style="font-family: Inconsolata, Menlo, Courier, monospace;">
http_1_options
</span>
</a>
</td>
<td style="text-align: left">
<code class="inline">Keyword.t</code>
</td>
<td style="text-align: left">
<code class="inline">[]</code>
</td>
<td style="text-align: left" colspan=2>
Options to configure the HTTP/1 stack in Bandit.
</td>
</tr>
<tr>
<td style="text-align: left">
<a id="wayfarer-config-listeners-http-http_2_options" href="#wayfarer-config-listeners-http-http_2_options">
<span style="font-family: Inconsolata, Menlo, Courier, monospace;">
http_2_options
</span>
</a>
</td>
<td style="text-align: left">
<code class="inline">Keyword.t</code>
</td>
<td style="text-align: left">
<code class="inline">[]</code>
</td>
<td style="text-align: left" colspan=2>
Options to configure the HTTP/2 stack in Bandit.
</td>
</tr>
<tr>
<td style="text-align: left">
<a id="wayfarer-config-listeners-http-thousand_island_options" href="#wayfarer-config-listeners-http-thousand_island_options">
<span style="font-family: Inconsolata, Menlo, Courier, monospace;">
thousand_island_options
</span>
</a>
</td>
<td style="text-align: left">
<code class="inline">Keyword.t</code>
</td>
<td style="text-align: left">
<code class="inline">[]</code>
</td>
<td style="text-align: left" colspan=2>
Possible options to configure a ThousandIsland server.
</td>
</tr>
<tr>
<td style="text-align: left">
<a id="wayfarer-config-listeners-http-websocket_options" href="#wayfarer-config-listeners-http-websocket_options">
<span style="font-family: Inconsolata, Menlo, Courier, monospace;">
websocket_options
</span>
</a>
</td>
<td style="text-align: left">
<code class="inline">Keyword.t</code>
</td>
<td style="text-align: left">
<code class="inline">[]</code>
</td>
<td style="text-align: left" colspan=2>
Options to configure the WebSocket stack in Bandit.
</td>
</tr>
</tbody>
</table>
### Introspection
Target: `Wayfarer.Dsl.Listener`
## wayfarer.config.listeners.https
```elixir
https address, port
```
### Arguments
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Default</th>
<th colspan=2>Docs</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left">
<a id="wayfarer-config-listeners-https-address" href="#wayfarer-config-listeners-https-address">
<span style="font-family: Inconsolata, Menlo, Courier, monospace;">
address
</span>
</a>
<sup style="color: red">*</sup>
</td>
<td style="text-align: left">
<code class="inline">IP.Address | String.t</code>
</td>
<td style="text-align: left">
</td>
<td style="text-align: left" colspan=2>
The address of the interface to listen on.
</td>
</tr>
<tr>
<td style="text-align: left">
<a id="wayfarer-config-listeners-https-port" href="#wayfarer-config-listeners-https-port">
<span style="font-family: Inconsolata, Menlo, Courier, monospace;">
port
</span>
</a>
<sup style="color: red">*</sup>
</td>
<td style="text-align: left">
<code class="inline">pos_integer</code>
</td>
<td style="text-align: left">
</td>
<td style="text-align: left" colspan=2>
The TCP port on which to listen for incoming connections.
</td>
</tr>
</tbody>
</table>
### Options
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Default</th>
<th colspan=2>Docs</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left">
<a id="wayfarer-config-listeners-https-scheme" href="#wayfarer-config-listeners-https-scheme">
<span style="font-family: Inconsolata, Menlo, Courier, monospace;">
scheme
</span>
</a>
<sup style="color: red">*</sup>
</td>
<td style="text-align: left">
<code class="inline">:http | :https</code>
</td>
<td style="text-align: left">
</td>
<td style="text-align: left" colspan=2>
The listening protocol.
</td>
</tr>
<tr>
<td style="text-align: left">
<a id="wayfarer-config-listeners-https-name" href="#wayfarer-config-listeners-https-name">
<span style="font-family: Inconsolata, Menlo, Courier, monospace;">
name
</span>
</a>
</td>
<td style="text-align: left">
<code class="inline">nil | String.t</code>
</td>
<td style="text-align: left">
</td>
<td style="text-align: left" colspan=2>
A unique name for the listener (defaults to the URI).
</td>
</tr>
<tr>
<td style="text-align: left">
<a id="wayfarer-config-listeners-https-http_1_options" href="#wayfarer-config-listeners-https-http_1_options">
<span style="font-family: Inconsolata, Menlo, Courier, monospace;">
http_1_options
</span>
</a>
</td>
<td style="text-align: left">
<code class="inline">Keyword.t</code>
</td>
<td style="text-align: left">
<code class="inline">[]</code>
</td>
<td style="text-align: left" colspan=2>
Options to configure the HTTP/1 stack in Bandit.
</td>
</tr>
<tr>
<td style="text-align: left">
<a id="wayfarer-config-listeners-https-http_2_options" href="#wayfarer-config-listeners-https-http_2_options">
<span style="font-family: Inconsolata, Menlo, Courier, monospace;">
http_2_options
</span>
</a>
</td>
<td style="text-align: left">
<code class="inline">Keyword.t</code>
</td>
<td style="text-align: left">
<code class="inline">[]</code>
</td>
<td style="text-align: left" colspan=2>
Options to configure the HTTP/2 stack in Bandit.
</td>
</tr>
<tr>
<td style="text-align: left">
<a id="wayfarer-config-listeners-https-thousand_island_options" href="#wayfarer-config-listeners-https-thousand_island_options">
<span style="font-family: Inconsolata, Menlo, Courier, monospace;">
thousand_island_options
</span>
</a>
</td>
<td style="text-align: left">
<code class="inline">Keyword.t</code>
</td>
<td style="text-align: left">
<code class="inline">[]</code>
</td>
<td style="text-align: left" colspan=2>
Possible options to configure a ThousandIsland server.
</td>
</tr>
<tr>
<td style="text-align: left">
<a id="wayfarer-config-listeners-https-websocket_options" href="#wayfarer-config-listeners-https-websocket_options">
<span style="font-family: Inconsolata, Menlo, Courier, monospace;">
websocket_options
</span>
</a>
</td>
<td style="text-align: left">
<code class="inline">Keyword.t</code>
</td>
<td style="text-align: left">
<code class="inline">[]</code>
</td>
<td style="text-align: left" colspan=2>
Options to configure the WebSocket stack in Bandit.
</td>
</tr>
<tr>
<td style="text-align: left">
<a id="wayfarer-config-listeners-https-certfile" href="#wayfarer-config-listeners-https-certfile">
<span style="font-family: Inconsolata, Menlo, Courier, monospace;">
certfile
</span>
</a>
</td>
<td style="text-align: left">
<code class="inline">String.t</code>
</td>
<td style="text-align: left">
</td>
<td style="text-align: left" colspan=2>
The path to a file containing the SSL certificate to use for this listener.
</td>
</tr>
<tr>
<td style="text-align: left">
<a id="wayfarer-config-listeners-https-keyfile" href="#wayfarer-config-listeners-https-keyfile">
<span style="font-family: Inconsolata, Menlo, Courier, monospace;">
keyfile
</span>
</a>
</td>
<td style="text-align: left">
<code class="inline">String.t</code>
</td>
<td style="text-align: left">
</td>
<td style="text-align: left" colspan=2>
The path to a file containing the SSL key to use for this listener.
</td>
</tr>
<tr>
<td style="text-align: left">
<a id="wayfarer-config-listeners-https-cipher_suite" href="#wayfarer-config-listeners-https-cipher_suite">
<span style="font-family: Inconsolata, Menlo, Courier, monospace;">
cipher_suite
</span>
</a>
</td>
<td style="text-align: left">
<code class="inline">nil | :strong | :compatible</code>
</td>
<td style="text-align: left">
</td>
<td style="text-align: left" colspan=2>
Used to define a pre-selected set of ciphers, as described by `Plug.SSL.configure/1`.
</td>
</tr>
</tbody>
</table>
### Introspection
Target: `Wayfarer.Dsl.Listener`
### Introspection
Target: `Wayfarer.Dsl.Listeners`
## wayfarer.config.targets
### Nested DSLs
* [http](#wayfarer-config-targets-http)
* health_checks
* check
* [https](#wayfarer-config-targets-https)
* health_checks
* check
* [plug](#wayfarer-config-targets-plug)
### Options
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Default</th>
<th colspan=2>Docs</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left">
<a id="wayfarer-config-targets-algorithm" href="#wayfarer-config-targets-algorithm">
<span style="font-family: Inconsolata, Menlo, Courier, monospace;">
algorithm
</span>
</a>
</td>
<td style="text-align: left">
<code class="inline">:round_robin | :sticky</code>
</td>
<td style="text-align: left">
<code class="inline">:round_robin</code>
</td>
<td style="text-align: left" colspan=2>
The target selection algorithm.
</td>
</tr>
</tbody>
</table>
## wayfarer.config.targets.http
```elixir
http address, port
```
### Nested DSLs
* [health_checks](#wayfarer-config-targets-http-health_checks)
* check
### Arguments
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Default</th>
<th colspan=2>Docs</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left">
<a id="wayfarer-config-targets-http-address" href="#wayfarer-config-targets-http-address">
<span style="font-family: Inconsolata, Menlo, Courier, monospace;">
address
</span>
</a>
<sup style="color: red">*</sup>
</td>
<td style="text-align: left">
<code class="inline">IP.Address | String.t</code>
</td>
<td style="text-align: left">
</td>
<td style="text-align: left" colspan=2>
The address of the interface to listen on.
</td>
</tr>
<tr>
<td style="text-align: left">
<a id="wayfarer-config-targets-http-port" href="#wayfarer-config-targets-http-port">
<span style="font-family: Inconsolata, Menlo, Courier, monospace;">
port
</span>
</a>
<sup style="color: red">*</sup>
</td>
<td style="text-align: left">
<code class="inline">pos_integer</code>
</td>
<td style="text-align: left">
</td>
<td style="text-align: left" colspan=2>
The TCP port on which to listen for incoming connections.
</td>
</tr>
</tbody>
</table>
### Options
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Default</th>
<th colspan=2>Docs</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left">
<a id="wayfarer-config-targets-http-name" href="#wayfarer-config-targets-http-name">
<span style="font-family: Inconsolata, Menlo, Courier, monospace;">
name
</span>
</a>
</td>
<td style="text-align: left">
<code class="inline">nil | String.t</code>
</td>
<td style="text-align: left">
</td>
<td style="text-align: left" colspan=2>
A unique name for the target (defaults to the URI).
</td>
</tr>
</tbody>
</table>
## wayfarer.config.targets.http.health_checks
### Nested DSLs
* [check](#wayfarer-config-targets-http-health_checks-check)
## wayfarer.config.targets.http.health_checks.check
```elixir
check name \ nil
```
### Arguments
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Default</th>
<th colspan=2>Docs</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left">
<a id="wayfarer-config-targets-http-health_checks-check-name" href="#wayfarer-config-targets-http-health_checks-check-name">
<span style="font-family: Inconsolata, Menlo, Courier, monospace;">
name
</span>
</a>
</td>
<td style="text-align: left">
<code class="inline">String.t | nil</code>
</td>
<td style="text-align: left">
</td>
<td style="text-align: left" colspan=2>
A unique name for the health check.
</td>
</tr>
</tbody>
</table>
### Options
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Default</th>
<th colspan=2>Docs</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left">
<a id="wayfarer-config-targets-http-health_checks-check-method" href="#wayfarer-config-targets-http-health_checks-check-method">
<span style="font-family: Inconsolata, Menlo, Courier, monospace;">
method
</span>
</a>
</td>
<td style="text-align: left">
<code class="inline">:get | :head | :post | :put | :delete | :connect | :options | :trace | :patch</code>
</td>
<td style="text-align: left">
<code class="inline">:get</code>
</td>
<td style="text-align: left" colspan=2>
The HTTP method to use for the request.
</td>
</tr>
<tr>
<td style="text-align: left">
<a id="wayfarer-config-targets-http-health_checks-check-connect_timeout" href="#wayfarer-config-targets-http-health_checks-check-connect_timeout">
<span style="font-family: Inconsolata, Menlo, Courier, monospace;">
connect_timeout
</span>
</a>
</td>
<td style="text-align: left">
<code class="inline">pos_integer</code>
</td>
<td style="text-align: left">
<code class="inline">5000</code>
</td>
<td style="text-align: left" colspan=2>
Connection timeout in milliseconds
</td>
</tr>
<tr>
<td style="text-align: left">
<a id="wayfarer-config-targets-http-health_checks-check-response_timeout" href="#wayfarer-config-targets-http-health_checks-check-response_timeout">
<span style="font-family: Inconsolata, Menlo, Courier, monospace;">
response_timeout
</span>
</a>
</td>
<td style="text-align: left">
<code class="inline">pos_integer</code>
</td>
<td style="text-align: left">
<code class="inline">500</code>
</td>
<td style="text-align: left" colspan=2>
Response timeout in milliseconds
</td>
</tr>
<tr>
<td style="text-align: left">
<a id="wayfarer-config-targets-http-health_checks-check-hostname" href="#wayfarer-config-targets-http-health_checks-check-hostname">
<span style="font-family: Inconsolata, Menlo, Courier, monospace;">
hostname
</span>
</a>
</td>
<td style="text-align: left">
<code class="inline">nil | String.t</code>
</td>
<td style="text-align: left">
</td>
<td style="text-align: left" colspan=2>
The HTTP hostname to use when sending the request. Defaults to the IP address.
</td>
</tr>
<tr>
<td style="text-align: left">
<a id="wayfarer-config-targets-http-health_checks-check-interval" href="#wayfarer-config-targets-http-health_checks-check-interval">
<span style="font-family: Inconsolata, Menlo, Courier, monospace;">
interval
</span>
</a>
</td>
<td style="text-align: left">
<code class="inline">pos_integer</code>
</td>
<td style="text-align: left">
<code class="inline">30000</code>
</td>
<td style="text-align: left" colspan=2>
Interval in milliseconds
</td>
</tr>
<tr>
<td style="text-align: left">
<a id="wayfarer-config-targets-http-health_checks-check-threshold" href="#wayfarer-config-targets-http-health_checks-check-threshold">
<span style="font-family: Inconsolata, Menlo, Courier, monospace;">
threshold
</span>
</a>
</td>
<td style="text-align: left">
<code class="inline">pos_integer</code>
</td>
<td style="text-align: left">
<code class="inline">3</code>
</td>
<td style="text-align: left" colspan=2>
Success threshold
</td>
</tr>
<tr>
<td style="text-align: left">
<a id="wayfarer-config-targets-http-health_checks-check-path" href="#wayfarer-config-targets-http-health_checks-check-path">
<span style="font-family: Inconsolata, Menlo, Courier, monospace;">
path
</span>
</a>
</td>
<td style="text-align: left">
<code class="inline">String.t</code>
</td>
<td style="text-align: left">
<code class="inline">"/"</code>
</td>
<td style="text-align: left" colspan=2>
Path
</td>
</tr>
<tr>
<td style="text-align: left">
<a id="wayfarer-config-targets-http-health_checks-check-success_codes" href="#wayfarer-config-targets-http-health_checks-check-success_codes">
<span style="font-family: Inconsolata, Menlo, Courier, monospace;">
success_codes
</span>
</a>
</td>
<td style="text-align: left">
<code class="inline">list(Range) | Range</code>
</td>
<td style="text-align: left">
<code class="inline">[200..299]</code>
</td>
<td style="text-align: left" colspan=2>
HTTP status codes which are considered successful.
</td>
</tr>
</tbody>
</table>
### Introspection
Target: `Wayfarer.Dsl.HealthCheck`
### Introspection
Target: `Wayfarer.Dsl.HealthChecks`
### Introspection
Target: `Wayfarer.Dsl.Target`
## wayfarer.config.targets.https
```elixir
https address, port
```
### Nested DSLs
* [health_checks](#wayfarer-config-targets-https-health_checks)
* check
### Arguments
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Default</th>
<th colspan=2>Docs</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left">
<a id="wayfarer-config-targets-https-address" href="#wayfarer-config-targets-https-address">
<span style="font-family: Inconsolata, Menlo, Courier, monospace;">
address
</span>
</a>
<sup style="color: red">*</sup>
</td>
<td style="text-align: left">
<code class="inline">IP.Address | String.t</code>
</td>
<td style="text-align: left">
</td>
<td style="text-align: left" colspan=2>
The address of the interface to listen on.
</td>
</tr>
<tr>
<td style="text-align: left">
<a id="wayfarer-config-targets-https-port" href="#wayfarer-config-targets-https-port">
<span style="font-family: Inconsolata, Menlo, Courier, monospace;">
port
</span>
</a>
<sup style="color: red">*</sup>
</td>
<td style="text-align: left">
<code class="inline">pos_integer</code>
</td>
<td style="text-align: left">
</td>
<td style="text-align: left" colspan=2>
The TCP port on which to listen for incoming connections.
</td>
</tr>
</tbody>
</table>
### Options
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Default</th>
<th colspan=2>Docs</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left">
<a id="wayfarer-config-targets-https-name" href="#wayfarer-config-targets-https-name">
<span style="font-family: Inconsolata, Menlo, Courier, monospace;">
name
</span>
</a>
</td>
<td style="text-align: left">
<code class="inline">nil | String.t</code>
</td>
<td style="text-align: left">
</td>
<td style="text-align: left" colspan=2>
A unique name for the target (defaults to the URI).
</td>
</tr>
</tbody>
</table>
## wayfarer.config.targets.https.health_checks
### Nested DSLs
* [check](#wayfarer-config-targets-https-health_checks-check)
## wayfarer.config.targets.https.health_checks.check
```elixir
check name \ nil
```
### Arguments
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Default</th>
<th colspan=2>Docs</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left">
<a id="wayfarer-config-targets-https-health_checks-check-name" href="#wayfarer-config-targets-https-health_checks-check-name">
<span style="font-family: Inconsolata, Menlo, Courier, monospace;">
name
</span>
</a>
</td>
<td style="text-align: left">
<code class="inline">String.t | nil</code>
</td>
<td style="text-align: left">
</td>
<td style="text-align: left" colspan=2>
A unique name for the health check.
</td>
</tr>
</tbody>
</table>
### Options
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Default</th>
<th colspan=2>Docs</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left">
<a id="wayfarer-config-targets-https-health_checks-check-method" href="#wayfarer-config-targets-https-health_checks-check-method">
<span style="font-family: Inconsolata, Menlo, Courier, monospace;">
method
</span>
</a>
</td>
<td style="text-align: left">
<code class="inline">:get | :head | :post | :put | :delete | :connect | :options | :trace | :patch</code>
</td>
<td style="text-align: left">
<code class="inline">:get</code>
</td>
<td style="text-align: left" colspan=2>
The HTTP method to use for the request.
</td>
</tr>
<tr>
<td style="text-align: left">
<a id="wayfarer-config-targets-https-health_checks-check-connect_timeout" href="#wayfarer-config-targets-https-health_checks-check-connect_timeout">
<span style="font-family: Inconsolata, Menlo, Courier, monospace;">
connect_timeout
</span>
</a>
</td>
<td style="text-align: left">
<code class="inline">pos_integer</code>
</td>
<td style="text-align: left">
<code class="inline">5000</code>
</td>
<td style="text-align: left" colspan=2>
Connection timeout in milliseconds
</td>
</tr>
<tr>
<td style="text-align: left">
<a id="wayfarer-config-targets-https-health_checks-check-response_timeout" href="#wayfarer-config-targets-https-health_checks-check-response_timeout">
<span style="font-family: Inconsolata, Menlo, Courier, monospace;">
response_timeout
</span>
</a>
</td>
<td style="text-align: left">
<code class="inline">pos_integer</code>
</td>
<td style="text-align: left">
<code class="inline">500</code>
</td>
<td style="text-align: left" colspan=2>
Response timeout in milliseconds
</td>
</tr>
<tr>
<td style="text-align: left">
<a id="wayfarer-config-targets-https-health_checks-check-hostname" href="#wayfarer-config-targets-https-health_checks-check-hostname">
<span style="font-family: Inconsolata, Menlo, Courier, monospace;">
hostname
</span>
</a>
</td>
<td style="text-align: left">
<code class="inline">nil | String.t</code>
</td>
<td style="text-align: left">
</td>
<td style="text-align: left" colspan=2>
The HTTP hostname to use when sending the request. Defaults to the IP address.
</td>
</tr>
<tr>
<td style="text-align: left">
<a id="wayfarer-config-targets-https-health_checks-check-interval" href="#wayfarer-config-targets-https-health_checks-check-interval">
<span style="font-family: Inconsolata, Menlo, Courier, monospace;">
interval
</span>
</a>
</td>
<td style="text-align: left">
<code class="inline">pos_integer</code>
</td>
<td style="text-align: left">
<code class="inline">30000</code>
</td>
<td style="text-align: left" colspan=2>
Interval in milliseconds
</td>
</tr>
<tr>
<td style="text-align: left">
<a id="wayfarer-config-targets-https-health_checks-check-threshold" href="#wayfarer-config-targets-https-health_checks-check-threshold">
<span style="font-family: Inconsolata, Menlo, Courier, monospace;">
threshold
</span>
</a>
</td>
<td style="text-align: left">
<code class="inline">pos_integer</code>
</td>
<td style="text-align: left">
<code class="inline">3</code>
</td>
<td style="text-align: left" colspan=2>
Success threshold
</td>
</tr>
<tr>
<td style="text-align: left">
<a id="wayfarer-config-targets-https-health_checks-check-path" href="#wayfarer-config-targets-https-health_checks-check-path">
<span style="font-family: Inconsolata, Menlo, Courier, monospace;">
path
</span>
</a>
</td>
<td style="text-align: left">
<code class="inline">String.t</code>
</td>
<td style="text-align: left">
<code class="inline">"/"</code>
</td>
<td style="text-align: left" colspan=2>
Path
</td>
</tr>
<tr>
<td style="text-align: left">
<a id="wayfarer-config-targets-https-health_checks-check-success_codes" href="#wayfarer-config-targets-https-health_checks-check-success_codes">
<span style="font-family: Inconsolata, Menlo, Courier, monospace;">
success_codes
</span>
</a>
</td>
<td style="text-align: left">
<code class="inline">list(Range) | Range</code>
</td>
<td style="text-align: left">
<code class="inline">[200..299]</code>
</td>
<td style="text-align: left" colspan=2>
HTTP status codes which are considered successful.
</td>
</tr>
</tbody>
</table>
### Introspection
Target: `Wayfarer.Dsl.HealthCheck`
### Introspection
Target: `Wayfarer.Dsl.HealthChecks`
### Introspection
Target: `Wayfarer.Dsl.Target`
## wayfarer.config.targets.plug
```elixir
plug module
```
### Arguments
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Default</th>
<th colspan=2>Docs</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left">
<a id="wayfarer-config-targets-plug-module" href="#wayfarer-config-targets-plug-module">
<span style="font-family: Inconsolata, Menlo, Courier, monospace;">
module
</span>
</a>
<sup style="color: red">*</sup>
</td>
<td style="text-align: left">
<code class="inline">module</code>
</td>
<td style="text-align: left">
</td>
<td style="text-align: left" colspan=2>
A plug which can handle requests.
</td>
</tr>
</tbody>
</table>
### Introspection
Target: `Wayfarer.Dsl.Target`
### Introspection
Target: `Wayfarer.Dsl.Targets`
### Introspection
Target: `Wayfarer.Dsl.Config`