coredns/man/coredns-metadata.7
Miek Gieben d9880681c3
mechanical: make -f Makefile.doc (#2390)
update the manpages by running make -f Makefile.doc

No other changes.

Signed-off-by: Miek Gieben <miek@miek.nl>
2018-12-11 20:46:02 +00:00

44 lines
2 KiB
Groff

.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "COREDNS\-METADATA" "7" "December 2018" "CoreDNS" "CoreDNS plugins"
.
.SH "NAME"
\fImetadata\fR \- enable a meta data collector\.
.
.SH "DESCRIPTION"
By enabling \fImetadata\fR any plugin that implements metadata\.Provider interface \fIhttps://godoc\.org/github\.com/coredns/coredns/plugin/metadata#Provider\fR will be called for each DNS query, at beginning of the process for that query, in order to add it\'s own meta data to context\.
.
.P
The meta data collected will be available for all plugins, via the Context parameter provided in the ServeDNS function\. The package (code) documentation has examples on how to inspect and retrieve metadata a plugin might be interested in\.
.
.P
The meta data is added by setting a label with a value in the context\. These labels should be named \fBplugin/NAME\fR, where \fBNAME\fR is something descriptive\. The only hard requirement the \fImetadata\fR plugin enforces is that the labels contains a slash\. See the documentation for \fBmetadata\.SetValueFunc\fR\.
.
.P
The value stored is a string\. The empty string signals "no meta data"\. See the documentation for \fBmetadata\.ValueFunc\fR on how to retrieve this\.
.
.SH "SYNTAX"
.
.nf
metadata [ZONES\.\.\. ]
.
.fi
.
.IP "\(bu" 4
\fBZONES\fR zones metadata should be invoked for\.
.
.IP "" 0
.
.SH "PLUGINS"
\fBmetadata\.Provider\fR interface needs to be implemented by each plugin willing to provide metadata information for other plugins\. It will be called by metadata and gather the information from all plugins in context\.
.
.P
Note: this method should work quickly, because it is called for every request\.
.
.SH "EXAMPLES"
The \fIrewrite\fR plugin uses meta data to rewrite requests\.
.
.SH "ALSO SEE"
The Provider interface \fIhttps://godoc\.org/github\.com/coredns/coredns/plugin/metadata#Provider\fR and the package level \fIhttps://godoc\.org/github\.com/coredns/coredns/plugin/metadata\fR documentation\.