coredns/plugin
Miek Gieben b3b8a7e4b7
plugin/dnstap: various cleanups (#4179)
* plugin/dnstap: various cleanups

A recent issue made me look into this plugin, I suspect various other
cleanups (hopefully deletion of code) can be made as well

Remove identical functions ToClientQuery etc, and just use tap.Message
as the base type in plugin. Keep msg/ for a few helper functions that
may proof useful.

This remove the whole test directory as we will just check the things we
are interested in which gives much better feedback and keeps that code
closer together.

tapwr dir is also not needed, writer_test.go was just duplicating the
tests already done. This moves writer.go to the top directory.

Make the only user of dnstap, the forward plugin, use the newer code
also remove the test, a better test there would be a full e2e test to
see the correct thing happens.

Cleanup the Tapper interface and move it to dnstapio where it belongs,
remove higher level interfaces that are not used. This remove
dnstap.Tapper and dnstap.IORoutines.

Use the standard mechanism for getting access to a plugin and remove
shuffling the plugin into the context.

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

* use opts to get the correct proto

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

* Various fixes

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

* Remove bad addr test, as dnstap is only called from within coredns where these fields have been preparsed

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

* dnstap: remove saving the error

all these fields have been preparsed, no need for dnstap to be pedantic
and check (and save!) this error again.

Simplifies it a bit more.

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

* Update plugin/forward/dnstap.go

Co-authored-by: Ruslan Drozhdzh <30860269+rdrozhdzh@users.noreply.github.com>

* Code review

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

* add back in preferUDP

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

* nit

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

Co-authored-by: Ruslan Drozhdzh <30860269+rdrozhdzh@users.noreply.github.com>
2020-10-12 19:10:35 +02:00
..
acl For caddy v1 in our org (#4018) 2020-09-24 18:14:41 +02:00
any For caddy v1 in our org (#4018) 2020-09-24 18:14:41 +02:00
auto plugins/auto: allow fallthrough if no zone match (#4166) 2020-10-01 15:25:19 +02:00
autopath For caddy v1 in our org (#4018) 2020-09-24 18:14:41 +02:00
azure For caddy v1 in our org (#4018) 2020-09-24 18:14:41 +02:00
bind For caddy v1 in our org (#4018) 2020-09-24 18:14:41 +02:00
bufsize For caddy v1 in our org (#4018) 2020-09-24 18:14:41 +02:00
cache plugin/cache: Fix filtering (#4148) 2020-09-28 07:53:00 -07:00
cancel For caddy v1 in our org (#4018) 2020-09-24 18:14:41 +02:00
chaos For caddy v1 in our org (#4018) 2020-09-24 18:14:41 +02:00
clouddns For caddy v1 in our org (#4018) 2020-09-24 18:14:41 +02:00
debug For caddy v1 in our org (#4018) 2020-09-24 18:14:41 +02:00
deprecated For caddy v1 in our org (#4018) 2020-09-24 18:14:41 +02:00
dns64 For caddy v1 in our org (#4018) 2020-09-24 18:14:41 +02:00
dnssec For caddy v1 in our org (#4018) 2020-09-24 18:14:41 +02:00
dnstap plugin/dnstap: various cleanups (#4179) 2020-10-12 19:10:35 +02:00
erratic For caddy v1 in our org (#4018) 2020-09-24 18:14:41 +02:00
errors For caddy v1 in our org (#4018) 2020-09-24 18:14:41 +02:00
etcd Cherry-pick: Implement notifies for transfer plugin (#3972) (#4142) 2020-09-24 20:30:39 +02:00
file Cherry-pick: Implement notifies for transfer plugin (#3972) (#4142) 2020-09-24 20:30:39 +02:00
forward plugin/dnstap: various cleanups (#4179) 2020-10-12 19:10:35 +02:00
grpc For caddy v1 in our org (#4018) 2020-09-24 18:14:41 +02:00
health fix lameduck docs (#4169) 2020-10-01 08:03:34 -07:00
hosts For caddy v1 in our org (#4018) 2020-09-24 18:14:41 +02:00
import Directive -> plugin (#3363) 2019-10-08 10:20:48 +01:00
k8s_external For caddy v1 in our org (#4018) 2020-09-24 18:14:41 +02:00
kubernetes Cherry-pick: Implement notifies for transfer plugin (#3972) (#4142) 2020-09-24 20:30:39 +02:00
loadbalance For caddy v1 in our org (#4018) 2020-09-24 18:14:41 +02:00
log For caddy v1 in our org (#4018) 2020-09-24 18:14:41 +02:00
loop For caddy v1 in our org (#4018) 2020-09-24 18:14:41 +02:00
metadata For caddy v1 in our org (#4018) 2020-09-24 18:14:41 +02:00
metrics For caddy v1 in our org (#4018) 2020-09-24 18:14:41 +02:00
nsid For caddy v1 in our org (#4018) 2020-09-24 18:14:41 +02:00
pkg Cherry-pick: Implement notifies for transfer plugin (#3972) (#4142) 2020-09-24 20:30:39 +02:00
pprof For caddy v1 in our org (#4018) 2020-09-24 18:14:41 +02:00
ready dont return 200 during shutdown (#4167) 2020-10-01 16:13:23 +02:00
reload For caddy v1 in our org (#4018) 2020-09-24 18:14:41 +02:00
rewrite For caddy v1 in our org (#4018) 2020-09-24 18:14:41 +02:00
root For caddy v1 in our org (#4018) 2020-09-24 18:14:41 +02:00
route53 For caddy v1 in our org (#4018) 2020-09-24 18:14:41 +02:00
secondary Cherry-pick: Implement notifies for transfer plugin (#3972) (#4142) 2020-09-24 20:30:39 +02:00
sign For caddy v1 in our org (#4018) 2020-09-24 18:14:41 +02:00
template For caddy v1 in our org (#4018) 2020-09-24 18:14:41 +02:00
test goreport card fixes (#4139) 2020-09-22 09:22:00 +02:00
tls For caddy v1 in our org (#4018) 2020-09-24 18:14:41 +02:00
trace Add proto and remote tags to trace plugin (#4159) 2020-09-29 10:43:58 +02:00
transfer Cherry-pick: Implement notifies for transfer plugin (#3972) (#4142) 2020-09-24 20:30:39 +02:00
whoami For caddy v1 in our org (#4018) 2020-09-24 18:14:41 +02:00
backend.go Cherry-pick: Implement notifies for transfer plugin (#3972) (#4142) 2020-09-24 20:30:39 +02:00
backend_lookup.go backend: fix root zone usage (#4039) 2020-07-31 10:58:09 +02:00
done.go go report card fixes (#3182) 2019-08-24 18:14:25 +00:00
log_test.go Clean up tests logging (#1979) 2018-07-19 16:23:06 +01:00
normalize.go add MustNormalize (#3385) 2019-10-19 08:08:14 +01:00
normalize_test.go add MustNormalize (#3385) 2019-10-19 08:08:14 +01:00
plugin.go typo fixes (#3169) 2019-08-21 16:08:55 -04:00
register.go For caddy v1 in our org (#4018) 2020-09-24 18:14:41 +02:00