* Fix linter errors
* More linting fixes
* More docs and making members private that dont need to be public
* Fix linter errors
* More linting fixes
* More docs and making members private that dont need to be public
* More lint fixes
This leaves:
~~~
middleware/kubernetes/nametemplate/nametemplate.go:64:6: exported type NameTemplate should have comment or be unexported
middleware/kubernetes/nametemplate/nametemplate.go:71:1: exported method NameTemplate.SetTemplate should have comment or be unexported
middleware/kubernetes/nametemplate/nametemplate.go:108:1: exported method NameTemplate.GetZoneFromSegmentArray should have comment or be unexported
middleware/kubernetes/nametemplate/nametemplate.go:116:1: exported method NameTemplate.GetNamespaceFromSegmentArray should have comment or be unexported
middleware/kubernetes/nametemplate/nametemplate.go:120:1: exported method NameTemplate.GetServiceFromSegmentArray should have comment or be unexported
middleware/kubernetes/nametemplate/nametemplate.go:124:1: exported method NameTemplate.GetTypeFromSegmentArray should have comment or be unexported
middleware/kubernetes/nametemplate/nametemplate.go:135:1: exported method NameTemplate.GetSymbolFromSegmentArray should have comment or be unexported
middleware/kubernetes/nametemplate/nametemplate.go:167:1: exported method NameTemplate.IsValid should have comment or be unexported
middleware/kubernetes/nametemplate/nametemplate.go:182:6: exported type NameValues should have comment or be unexported
middleware/kubernetes/util/util.go:1:1: package comment should be of the form "Package util ..."
middleware/kubernetes/util/util.go:27:2: exported const WildcardStar should have comment (or a comment on this block) or be unexported
middleware/proxy/lookup.go:66:1: exported method Proxy.Forward should have comment or be unexported
middleware/proxy/proxy.go:24:6: exported type Client should have comment or be unexported
middleware/proxy/proxy.go:107:1: exported function Clients should have comment or be unexported
middleware/proxy/reverseproxy.go:10:6: exported type ReverseProxy should have comment or be unexported
middleware/proxy/reverseproxy.go:16:1: exported method ReverseProxy.ServeDNS should have comment or be unexported
middleware/proxy/upstream.go:42:6: exported type Options should have comment or be unexported
~~~
I plan on reworking the proxy anyway, so I'll leave that be.
Move all (almost all) Go files in middleware into their
own packages. This makes for better naming and discoverability.
Lot of changes elsewhere to make this change.
The middleware.State was renamed to request.Request which is better,
but still does not cover all use-cases. It was also moved out middleware
because it is used by `dnsserver` as well.
A pkg/dnsutil packages was added for shared, handy, dns util functions.
All normalize functions are now put in normalize.go
Return a delegation when seeing one while traversing the tree in
search of an answer.
Put the SOA and NS record in the zone.Apex as these are to be handled
somewhat special.
Lowercase record on insert to make compares easier. This lowercases
all RR that have domain names in their rdata as well.
Error out when parsing and transferring such a zone. If we would serve
it we would give out the wrong answers, leading to (probably) validation
failures...
Fixes#114
Test shouldTransfer by upping a testserver and sending the SOA query.
Remove state from DefaultErrorHandler and just get it from the request.
Add more logging to show what is going on.
This also adds the infrastructure for future tests.
For prometheus use the plain value, not a pointer and change all usages.
Allow AXFR to be requested over udp as well and some other more log
printed when commencing an AXFR.
Respond to notifies and allow a secondary to follow the SOA parameters
to update a zone from a primary. Also sprinkle it with logging.
Also extend monitoring to include qtype in more metrics.
Make the CH middleware actually work. Needs a bit of a hack to route
the fake version.bind and friends zone to the correct handler. Fiddle
with the order in directive.go so that CH queries get logged as well.
Secondly add class rewriting to the rewrite middleware handler and also
log the class by default.
Allow specifying a primary server and retrieve the zone's content.
Add tests and an Expired bool to zone struct, to stop server zones
that are expired. The zone is retrieved on Startup, no updates of
changed content are done. We also don't respond to notifies yet.
Full implementation, DNS (and in the future DNSSEC). Returns answer in a
hopefully standards compliant way.
Testing with my miek.nl zone are included as well.
This should correctly handle nodata, nxdomain and cnames.