Skip to content

Commit

Permalink
docs: further example config, update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
jdockerty committed Nov 14, 2023
1 parent 7eee162 commit c6a5d14
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ Health checks are conducted at a fixed interval upon the application starting an
The configuration is defined in YAML, using the `example-config.yaml` that is used for testing, it looks like this:

```yaml
# The interval, in seconds, to conduct HTTP/TCP health checks.
health_check_interval: 5

# Log level information, defaults to 'info'
logging: info

Expand Down
17 changes: 17 additions & 0 deletions tests/fixtures/example-config.yaml
Original file line number Diff line number Diff line change
@@ -1,19 +1,36 @@
# The interval, in seconds, to conduct HTTP/TCP health checks.
health_check_interval: 5

# Log level information, defaults to 'info'
logging: info

# Defined "targets", the key simply acts as a convenient label for various backend
# servers which are to have traffic routed to them.
targets:

# TCP target example
tcpServersA:
# Either TCP or HTTP, defaults to TCP when not set.
protocol: 'tcp'

# Port to bind to for this target.
listener: 9090

# Statically defined backend servers.
backends:
- host: "127.0.0.1"
port: 8090
- host: "127.0.0.1"
port: 8091

# HTTP target example
webServersA:
protocol: 'http'
listener: 8080
backends:
- host: "127.0.0.1"
port: 8092
# A `health_path` is only required for HTTP backends.
health_path: "/health"
- host: "127.0.0.1"
port: 8093
Expand Down

0 comments on commit c6a5d14

Please sign in to comment.