docs: Add go-sockaddr examples for bind_addr (#8677)

Add examples of using a go-sockaddr template with `bind_addr` within
HCL or JSON configuration.

Resolves #8633
pull/8619/head
Blake Covarrubias 2020-09-18 08:15:30 -07:00 committed by GitHub
parent f2e138ae0a
commit 7e5c39d03d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 22 additions and 0 deletions

View File

@ -1106,6 +1106,28 @@ Valid time units are 'ns', 'us' (or 'µs'), 'ms', 's', 'm', 'h'."
- `bind_addr` Equivalent to the [`-bind` command-line flag](#_bind). - `bind_addr` Equivalent to the [`-bind` command-line flag](#_bind).
This parameter can be set to a go-sockaddr template that resolves to a single
address. Special characters such as blackslashes `\` or double quotes `"`
within a double quoted string value must be escaped with a backslash `\`.
Some example templates:
<Tabs>
<Tab heading="HCL">
```hcl
bind_addr = "{{ GetPrivateInterfaces | include \"network\" \"10.0.0.0/8\" | attr \"address\" }}"
```
</Tab>
<Tab heading="JSON">
```json
{
"bind_addr": "{{ GetPrivateInterfaces | include \"network\" \"10.0.0.0/8\" | attr \"address\" }}"
}
```
</Tab>
</Tabs>
- `cache` Cache configuration of agent. The configurable values are the following: - `cache` Cache configuration of agent. The configurable values are the following:
- `entry_fetch_max_burst`: The size of the token bucket used to recharge the rate-limit per - `entry_fetch_max_burst`: The size of the token bucket used to recharge the rate-limit per