aboutsummaryrefslogtreecommitdiff
path: root/plugin/dnstap/handler.go
diff options
context:
space:
mode:
authorGravatar Miek Gieben <miek@miek.nl> 2017-10-25 19:46:41 +0100
committerGravatar GitHub <noreply@github.com> 2017-10-25 19:46:41 +0100
commitc2d93f7182a55e0e9a819f44b87735f635200423 (patch)
tree7f1738db982038b2443ae059faa2b903d1858bae /plugin/dnstap/handler.go
parent25367a43296bf681c984121ae7f40e08f32508a8 (diff)
downloadcoredns-c2d93f7182a55e0e9a819f44b87735f635200423.tar.gz
coredns-c2d93f7182a55e0e9a819f44b87735f635200423.tar.zst
coredns-c2d93f7182a55e0e9a819f44b87735f635200423.zip
plugin/dnstap: some cleanup (#1172)
Some cleanup in proxy and dnstap: * just use time pkg directly and side step the indirection for Epoch * Use Set in SetQueryEpoch to be more Go like. (Looked like a reader) * Don't maintain two sets of time, we already track start, so use that. * Use time.Time and convert when needed * dedent the toDnstap function and put in a separate file
Diffstat (limited to 'plugin/dnstap/handler.go')
-rw-r--r--plugin/dnstap/handler.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugin/dnstap/handler.go b/plugin/dnstap/handler.go
index 63838492c..798da6014 100644
--- a/plugin/dnstap/handler.go
+++ b/plugin/dnstap/handler.go
@@ -79,7 +79,7 @@ func (h Dnstap) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg)
newCtx := context.WithValue(ctx, DnstapSendOption, &sendOption)
rw := &taprw.ResponseWriter{ResponseWriter: w, Tapper: &h, Query: r, Send: &sendOption}
- rw.QueryEpoch()
+ rw.SetQueryEpoch()
code, err := plugin.NextOrFailure(h.Name(), h.Next, tapContext{newCtx, h}, rw, r)
if err != nil {