coredns/plugin/metadata
Miek Gieben 195fe5d1a4
plugin/metadata: adjust doc to latest code. (#1923)
* plugin/metadata: adjust doc to latest code.

Signed-off-by: Miek Gieben <miek@miek.nl>
2018-07-06 09:41:37 +01:00
..
metadata.go plugin/metadata: metadata is just label=value (#1914) 2018-07-01 20:01:17 +01:00
metadata_test.go plugin/metadata: metadata is just label=value (#1914) 2018-07-01 20:01:17 +01:00
OWNERS plugin/metadata: add OWNERS file (#1915) 2018-06-30 22:01:31 +01:00
provider.go plugin/metadata: metadata is just label=value (#1914) 2018-07-01 20:01:17 +01:00
README.md plugin/metadata: adjust doc to latest code. (#1923) 2018-07-06 09:41:37 +01:00
setup.go plugin/metadata: metadata is just label=value (#1914) 2018-07-01 20:01:17 +01:00
setup_test.go plugin/metadata: add metadata plugin (#1894) 2018-06-29 10:44:16 +01:00

metadata

Name

metadata - enable a meta data collector.

Description

By enabling metadata any plugin that implements metadata.Provider interface will be called for each DNS query, at beginning of the process for that query, in order to add it's own Metadata to context.

The metadata 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.

TODO: write about naming of the keys (labels). TODO: write about extracting and using

Syntax

metadata [ZONES... ]
  • ZONES zones metadata should be invoked for.

Plugins

metadata.Provider 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.

Note: this method should work quickly, because it is called for every request.

Examples

There are currently no in tree plugins that write or use metadata.

Also See

The Provider interface and the package level documentation.