plugin/dnstap: remove config struct (#4258)

* plugin/dnstap: remove config struct

this struct is an uneeded intermidiate to get a dnstap it can be
removed. Remove the dnstapio subpkg: it's also not needed. Make *many*
functions and structs private now that we can.

Signed-off-by: Miek Gieben <miek@miek.nl>

* correct logging

Signed-off-by: Miek Gieben <miek@miek.nl>
This commit is contained in:
Miek Gieben
2020-11-05 14:37:16 +01:00
committed by GitHub
parent fb5efa203d
commit 123da4c844
8 changed files with 102 additions and 102 deletions

View File

@@ -5,7 +5,6 @@ import (
"time"
"github.com/coredns/coredns/plugin"
"github.com/coredns/coredns/plugin/dnstap/dnstapio"
tap "github.com/dnstap/golang-dnstap"
"github.com/miekg/dns"
@@ -14,7 +13,7 @@ import (
// Dnstap is the dnstap handler.
type Dnstap struct {
Next plugin.Handler
io dnstapio.Tapper
io tapper
// IncludeRawMessage will include the raw DNS message into the dnstap messages if true.
IncludeRawMessage bool
@@ -31,8 +30,8 @@ func (h Dnstap) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg)
rw := &ResponseWriter{
ResponseWriter: w,
Dnstap: h,
Query: r,
QueryTime: time.Now(),
query: r,
queryTime: time.Now(),
}
return plugin.NextOrFailure(h.Name(), h.Next, ctx, rw, r)