Skip to content

Commit

Permalink
Fixed typo and added example to docs (#1385)
Browse files Browse the repository at this point in the history
* Fixed typo and added example to templating language doc
  • Loading branch information
MrWong99 authored Apr 28, 2021
1 parent d699633 commit 6e0590f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion docs/templating-language.md
Original file line number Diff line number Diff line change
Expand Up @@ -580,11 +580,16 @@ order. If provided a node name, results are ordered by shortest round-trip time
to the provided node. If provided `_agent`, results are ordered by shortest
round-trip time to the local agent.

The `<FILTER>` attribute is optional; if omitted, only health services are
The `<FILTER>` attribute is optional; if omitted, only healthy services are
returned. Providing a filter allows for client-side filtering of services.

For example:

```liquid
{{ range service tag1.web@east-aws }}
server {{ .Name }} {{ .Address }}:{{ .Port }}{{ end }}
```

The example above is querying Consul for healthy "web" services, in the "east-aws" data center. The tag and data center attributes are optional. To query all nodes of the "web" service (regardless of tag) for the current data center:

```liquid
Expand Down

0 comments on commit 6e0590f

Please sign in to comment.