Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
COREDNS-METADATA(7)		CoreDNS	Plugins		   COREDNS-METADATA(7)

NAME
       metadata	- enables a metadata collector.

DESCRIPTION
       By  enabling  metadata any plugin that implements metadata.Provider in-
       terface	    <https://godoc.org/github.com/coredns/coredns/plugin/meta-
       data#Provider>  will  be	called for each	DNS query, at the beginning of
       the process for that query, in order to add its own  metadata  to  con-
       text.

       The  metadata collected will be available for all plugins, via the Con-
       text 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.

       The metadata is added by	setting	a label	with a value in	 the  context.
       These  labels  should be	named plugin/NAME, where NAME is something de-
       scriptive. The only hard	requirement the	metadata  plugin  enforces  is
       that  the  labels  contain  a  slash.  See  the documentation for meta-
       data.SetValueFunc.

       The value stored	is a string. The empty string signals  "no  metadata".
       See the documentation for metadata.ValueFunc on how to retrieve this.

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 con-
       text.

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

EXAMPLES
       The rewrite plugin uses meta data to rewrite requests.

SEE ALSO
       The			    Provider			     interface
       <https://godoc.org/github.com/coredns/coredns/plugin/metadata#Provider>
       and		   the			package			 level
       <https://godoc.org/github.com/coredns/coredns/plugin/metadata> documen-
       tation.

CoreDNS				  March	2021		   COREDNS-METADATA(7)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=coredns-metadata&sektion=7&manpath=FreeBSD+Ports+14.3.quarterly>

home | help