diff options
author | 2020-11-05 14:37:16 +0100 | |
---|---|---|
committer | 2020-11-05 14:37:16 +0100 | |
commit | 123da4c8443f19a9a9e427a95fe6f47160cd0c1b (patch) | |
tree | 2a0f06bd108ebba3f9ce4863442e3d5970c37c70 /plugin/dnstap/handler.go | |
parent | fb5efa203d569cced2bb77823dedcaa83c0739f5 (diff) | |
download | coredns-123da4c8443f19a9a9e427a95fe6f47160cd0c1b.tar.gz coredns-123da4c8443f19a9a9e427a95fe6f47160cd0c1b.tar.zst coredns-123da4c8443f19a9a9e427a95fe6f47160cd0c1b.zip |
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>
Diffstat (limited to 'plugin/dnstap/handler.go')
-rw-r--r-- | plugin/dnstap/handler.go | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/plugin/dnstap/handler.go b/plugin/dnstap/handler.go index 7451d63f0..b31508b81 100644 --- a/plugin/dnstap/handler.go +++ b/plugin/dnstap/handler.go @@ -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) |