Miek Gieben 9132b485e3 Small tweaks to the code | 5 tahun lalu | |
---|---|---|
LICENSE | 7 tahun lalu | |
README.md | 5 tahun lalu | |
example.go | 5 tahun lalu | |
example_test.go | 5 tahun lalu | |
go.mod | 5 tahun lalu | |
go.sum | 5 tahun lalu | |
health.go | 6 tahun lalu | |
metrics.go | 6 tahun lalu | |
setup.go | 5 tahun lalu | |
setup_test.go | 5 tahun lalu |
example - prints "example" on every query handled.
The example plugin prints "example" on every query that go handled by the server. It serves as documentation for writing CoreDNS plugins.
example
If monitoring is enabled (via the prometheus directive) the following metric is exported:
coredns_example_request_count_total{server}
- query count to the example plugin.The server
label indicated which server handled the request, see the metrics plugin for details.
This plugin implements dynamic health checking. It will always return healthy though.
In this configuration, we forward all queries to 9.9.9.9 and print "example" whenever we receive a query.
. {
forward . 9.9.9.9
example
}
See the manual.