docs: make -f Makefile.doc (#1589)

Mechanical change; ran the above command.
This commit is contained in:
Miek Gieben
2018-03-05 19:58:28 +00:00
committed by Yong Tang
parent 804f745951
commit 369bde5adc
31 changed files with 125 additions and 64 deletions

View File

@@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "COREDNS\-DNSTAP" "7" "February 2018" "CoreDNS" "CoreDNS plugins"
.TH "COREDNS\-DNSTAP" "7" "March 2018" "CoreDNS" "CoreDNS plugins"
.
.SH "NAME"
\fIdnstap\fR \- enable logging to dnstap
@@ -77,7 +77,7 @@ The following command listens on the given socket and decodes messages to stdout
.
.nf
% dnstap \-u /tmp/dnstap\.sock
$ dnstap \-u /tmp/dnstap\.sock
.
.fi
.
@@ -90,7 +90,7 @@ The following command listens on the given socket and saves message payloads to
.
.nf
% dnstap \-u /tmp/dnstap\.sock \-w /tmp/test\.dnstap
$ dnstap \-u /tmp/dnstap\.sock \-w /tmp/test\.dnstap
.
.fi
.
@@ -103,11 +103,37 @@ Listen for dnstap messages on port 6000\.
.
.nf
% dnstap \-l 127\.0\.0\.1:6000
$ dnstap \-l 127\.0\.0\.1:6000
.
.fi
.
.IP "" 0
.
.SH "USING DNSTAP IN YOUR PLUGIN"
.
.nf
import (
"github\.com/coredns/coredns/plugin/dnstap"
"github\.com/coredns/coredns/plugin/dnstap/msg"
)
func (h Dnstap) ServeDNS(ctx context\.Context, w dns\.ResponseWriter, r *dns\.Msg) (int, error) {
// log client query to Dnstap
if t := dnstap\.TapperFromContext(ctx); t != nil {
b := msg\.New()\.Time(time\.Now())\.Addr(w\.RemoteAddr())
if t\.Pack() {
b\.Msg(r)
}
if m, err := b\.ToClientQuery(); err == nil {
t\.TapMessage(m)
}
}
// \.\.\.
}
.
.fi
.
.SH "SEE ALSO"
dnstap\.info \fIhttp://dnstap\.info\fR\.