22 KiB
DSL: Wayfarer.Dsl
The Wayfarer DSL for defining static proxy configurations.
DSL options
wayfarer
- config
- health_checks
- check
- host_patterns
- pattern
- listeners
- http
- https
- targets
- http
- health_checks
- check
- health_checks
- https
- health_checks
- check
- health_checks
- plug
- http
- health_checks
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 is5000
. -
:response_timeout
(t:pos_integer/0
) - Response timeout in milliseconds The default value is500
. -
: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 is30000
. -
:threshold
(t:pos_integer/0
) - Success threshold The default value is3
. -
:path
(t:String.t/0
) - Path The default value is"/"
. -
:success_codes
(one or a list of struct of typeRange
) - 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 byPlug.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 is5000
. -
:response_timeout
(t:pos_integer/0
) - Response timeout in milliseconds The default value is500
. -
: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 is30000
. -
:threshold
(t:pos_integer/0
) - Success threshold The default value is3
. -
:path
(t:String.t/0
) - Path The default value is"/"
. -
:success_codes
(one or a list of struct of typeRange
) - 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 is5000
. -
:response_timeout
(t:pos_integer/0
) - Response timeout in milliseconds The default value is500
. -
: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 is30000
. -
:threshold
(t:pos_integer/0
) - Success threshold The default value is3
. -
:path
(t:String.t/0
) - Path The default value is"/"
. -
:success_codes
(one or a list of struct of typeRange
) - HTTP status codes which are considered successful. The default value is[200..299]
.
plug
:module
(module that adoptsPlug
or a module and options) - Required. A plug which can handle requests.
wayfarer
Nested DSLs
- config
- health_checks
- check
- host_patterns
- pattern
- listeners
- http
- https
- targets
- http
- health_checks
- check
- health_checks
- https
- health_checks
- check
- health_checks
- plug
- http
- health_checks
wayfarer.config
config name \\ nil
Nested DSLs
- health_checks
- check
- host_patterns
- pattern
- listeners
- http
- https
- targets
- http
- health_checks
- check
- health_checks
- https
- health_checks
- check
- health_checks
- plug
- http
Arguments
Name | Type | Default | Docs |
---|---|---|---|
name {: #wayfarer-config-name } |
String.t |
wayfarer.config.health_checks
Nested DSLs
wayfarer.config.health_checks.check
check name \\ nil
Arguments
Name | Type | Default | Docs |
---|---|---|---|
name {: #wayfarer-config-health_checks-check-name } |
String.t | nil |
A unique name for the health check. |
Options
Name | Type | Default | Docs |
---|---|---|---|
method {: #wayfarer-config-health_checks-check-method } |
:get | :head | :post | :put | :delete | :connect | :options | :trace | :patch |
:get |
The HTTP method to use for the request. |
connect_timeout {: #wayfarer-config-health_checks-check-connect_timeout } |
pos_integer |
5000 |
Connection timeout in milliseconds |
response_timeout {: #wayfarer-config-health_checks-check-response_timeout } |
pos_integer |
500 |
Response timeout in milliseconds |
hostname {: #wayfarer-config-health_checks-check-hostname } |
nil | String.t |
The HTTP hostname to use when sending the request. Defaults to the IP address. | |
interval {: #wayfarer-config-health_checks-check-interval } |
pos_integer |
30000 |
Interval in milliseconds |
threshold {: #wayfarer-config-health_checks-check-threshold } |
pos_integer |
3 |
Success threshold |
path {: #wayfarer-config-health_checks-check-path } |
String.t |
"/" |
Path |
success_codes {: #wayfarer-config-health_checks-check-success_codes } |
Range | list(Range) |
[200..299] |
HTTP status codes which are considered successful. |
Introspection
Target: Wayfarer.Dsl.HealthCheck
Introspection
Target: Wayfarer.Dsl.HealthChecks
wayfarer.config.host_patterns
Nested DSLs
wayfarer.config.host_patterns.pattern
pattern pattern
Arguments
Name | Type | Default | Docs |
---|---|---|---|
pattern {: #wayfarer-config-host_patterns-pattern-pattern .spark-required} |
String.t |
A hostname matching pattern. |
Introspection
Target: Wayfarer.Dsl.HostPattern
Introspection
Target: Wayfarer.Dsl.HostPatterns
wayfarer.config.listeners
Nested DSLs
wayfarer.config.listeners.http
http address, port
Arguments
Name | Type | Default | Docs |
---|---|---|---|
address {: #wayfarer-config-listeners-http-address .spark-required} |
IP.Address | String.t |
The address of the interface to listen on. | |
port {: #wayfarer-config-listeners-http-port .spark-required} |
pos_integer |
The TCP port on which to listen for incoming connections. |
Options
Name | Type | Default | Docs |
---|---|---|---|
scheme {: #wayfarer-config-listeners-http-scheme .spark-required} |
:http | :https |
The listening protocol. | |
name {: #wayfarer-config-listeners-http-name } |
nil | String.t |
A unique name for the listener (defaults to the URI). | |
http_1_options {: #wayfarer-config-listeners-http-http_1_options } |
keyword |
[] |
Options to configure the HTTP/1 stack in Bandit. |
http_2_options {: #wayfarer-config-listeners-http-http_2_options } |
keyword |
[] |
Options to configure the HTTP/2 stack in Bandit. |
thousand_island_options {: #wayfarer-config-listeners-http-thousand_island_options } |
keyword |
[] |
Possible options to configure a ThousandIsland server. |
websocket_options {: #wayfarer-config-listeners-http-websocket_options } |
keyword |
[] |
Options to configure the WebSocket stack in Bandit. |
Introspection
Target: Wayfarer.Dsl.Listener
wayfarer.config.listeners.https
https address, port
Arguments
Name | Type | Default | Docs |
---|---|---|---|
address {: #wayfarer-config-listeners-https-address .spark-required} |
IP.Address | String.t |
The address of the interface to listen on. | |
port {: #wayfarer-config-listeners-https-port .spark-required} |
pos_integer |
The TCP port on which to listen for incoming connections. |
Options
Name | Type | Default | Docs |
---|---|---|---|
scheme {: #wayfarer-config-listeners-https-scheme .spark-required} |
:http | :https |
The listening protocol. | |
name {: #wayfarer-config-listeners-https-name } |
nil | String.t |
A unique name for the listener (defaults to the URI). | |
http_1_options {: #wayfarer-config-listeners-https-http_1_options } |
keyword |
[] |
Options to configure the HTTP/1 stack in Bandit. |
http_2_options {: #wayfarer-config-listeners-https-http_2_options } |
keyword |
[] |
Options to configure the HTTP/2 stack in Bandit. |
thousand_island_options {: #wayfarer-config-listeners-https-thousand_island_options } |
keyword |
[] |
Possible options to configure a ThousandIsland server. |
websocket_options {: #wayfarer-config-listeners-https-websocket_options } |
keyword |
[] |
Options to configure the WebSocket stack in Bandit. |
certfile {: #wayfarer-config-listeners-https-certfile } |
String.t |
The path to a file containing the SSL certificate to use for this listener. | |
keyfile {: #wayfarer-config-listeners-https-keyfile } |
String.t |
The path to a file containing the SSL key to use for this listener. | |
cipher_suite {: #wayfarer-config-listeners-https-cipher_suite } |
nil | :strong | :compatible |
Used to define a pre-selected set of ciphers, as described by Plug.SSL.configure/1 . |
Introspection
Target: Wayfarer.Dsl.Listener
Introspection
Target: Wayfarer.Dsl.Listeners
wayfarer.config.targets
Nested DSLs
Options
Name | Type | Default | Docs |
---|---|---|---|
algorithm {: #wayfarer-config-targets-algorithm } |
:round_robin | :sticky |
:round_robin |
The target selection algorithm. |
wayfarer.config.targets.http
http address, port
Nested DSLs
- health_checks
- check
Arguments
Name | Type | Default | Docs |
---|---|---|---|
address {: #wayfarer-config-targets-http-address .spark-required} |
IP.Address | String.t |
The address of the interface to listen on. | |
port {: #wayfarer-config-targets-http-port .spark-required} |
pos_integer |
The TCP port on which to listen for incoming connections. |
Options
Name | Type | Default | Docs |
---|---|---|---|
name {: #wayfarer-config-targets-http-name } |
nil | String.t |
A unique name for the target (defaults to the URI). |
wayfarer.config.targets.http.health_checks
Nested DSLs
wayfarer.config.targets.http.health_checks.check
check name \\ nil
Arguments
Name | Type | Default | Docs |
---|---|---|---|
name {: #wayfarer-config-targets-http-health_checks-check-name } |
String.t | nil |
A unique name for the health check. |
Options
Name | Type | Default | Docs |
---|---|---|---|
method {: #wayfarer-config-targets-http-health_checks-check-method } |
:get | :head | :post | :put | :delete | :connect | :options | :trace | :patch |
:get |
The HTTP method to use for the request. |
connect_timeout {: #wayfarer-config-targets-http-health_checks-check-connect_timeout } |
pos_integer |
5000 |
Connection timeout in milliseconds |
response_timeout {: #wayfarer-config-targets-http-health_checks-check-response_timeout } |
pos_integer |
500 |
Response timeout in milliseconds |
hostname {: #wayfarer-config-targets-http-health_checks-check-hostname } |
nil | String.t |
The HTTP hostname to use when sending the request. Defaults to the IP address. | |
interval {: #wayfarer-config-targets-http-health_checks-check-interval } |
pos_integer |
30000 |
Interval in milliseconds |
threshold {: #wayfarer-config-targets-http-health_checks-check-threshold } |
pos_integer |
3 |
Success threshold |
path {: #wayfarer-config-targets-http-health_checks-check-path } |
String.t |
"/" |
Path |
success_codes {: #wayfarer-config-targets-http-health_checks-check-success_codes } |
Range | list(Range) |
[200..299] |
HTTP status codes which are considered successful. |
Introspection
Target: Wayfarer.Dsl.HealthCheck
Introspection
Target: Wayfarer.Dsl.HealthChecks
Introspection
Target: Wayfarer.Dsl.Target
wayfarer.config.targets.https
https address, port
Nested DSLs
- health_checks
- check
Arguments
Name | Type | Default | Docs |
---|---|---|---|
address {: #wayfarer-config-targets-https-address .spark-required} |
IP.Address | String.t |
The address of the interface to listen on. | |
port {: #wayfarer-config-targets-https-port .spark-required} |
pos_integer |
The TCP port on which to listen for incoming connections. |
Options
Name | Type | Default | Docs |
---|---|---|---|
name {: #wayfarer-config-targets-https-name } |
nil | String.t |
A unique name for the target (defaults to the URI). |
wayfarer.config.targets.https.health_checks
Nested DSLs
wayfarer.config.targets.https.health_checks.check
check name \\ nil
Arguments
Name | Type | Default | Docs |
---|---|---|---|
name {: #wayfarer-config-targets-https-health_checks-check-name } |
String.t | nil |
A unique name for the health check. |
Options
Name | Type | Default | Docs |
---|---|---|---|
method {: #wayfarer-config-targets-https-health_checks-check-method } |
:get | :head | :post | :put | :delete | :connect | :options | :trace | :patch |
:get |
The HTTP method to use for the request. |
connect_timeout {: #wayfarer-config-targets-https-health_checks-check-connect_timeout } |
pos_integer |
5000 |
Connection timeout in milliseconds |
response_timeout {: #wayfarer-config-targets-https-health_checks-check-response_timeout } |
pos_integer |
500 |
Response timeout in milliseconds |
hostname {: #wayfarer-config-targets-https-health_checks-check-hostname } |
nil | String.t |
The HTTP hostname to use when sending the request. Defaults to the IP address. | |
interval {: #wayfarer-config-targets-https-health_checks-check-interval } |
pos_integer |
30000 |
Interval in milliseconds |
threshold {: #wayfarer-config-targets-https-health_checks-check-threshold } |
pos_integer |
3 |
Success threshold |
path {: #wayfarer-config-targets-https-health_checks-check-path } |
String.t |
"/" |
Path |
success_codes {: #wayfarer-config-targets-https-health_checks-check-success_codes } |
Range | list(Range) |
[200..299] |
HTTP status codes which are considered successful. |
Introspection
Target: Wayfarer.Dsl.HealthCheck
Introspection
Target: Wayfarer.Dsl.HealthChecks
Introspection
Target: Wayfarer.Dsl.Target
wayfarer.config.targets.plug
plug module
Arguments
Name | Type | Default | Docs |
---|---|---|---|
module {: #wayfarer-config-targets-plug-module .spark-required} |
module |
A plug which can handle requests. |
Introspection
Target: Wayfarer.Dsl.Target
Introspection
Target: Wayfarer.Dsl.Targets
Introspection
Target: Wayfarer.Dsl.Config