* Rename middleware to plugin
first pass; mostly used 'sed', few spots where I manually changed
text.
This still builds a coredns binary.
* fmt error
* Rename AddMiddleware to AddPlugin
* Readd AddMiddleware to remain backwards compat
* Remove debug from interface and methods
* remove debug queries from etcd
* remove debug queries from k8s - they were not used
* And remove from mw/proxy-google as well
* Remove debug query test
* Add external service cnames
* remove cruft
* update CI k8s version
* change CI k8s version
* min k8s ver for ext services
* trying k8s 1.5
* k8s 1.5 requires ports spec
* remove kruft
* update dns schema version
This method parses the Host field in the service. It returns 1 or 3
things 1) it is a host 2) an IPv4 address or an 3) IPv6 address.
This simplifies some code a bit and allows for 1 way of parsing the Host
field.
This *only* parse the Host field, Mail and/or Text values should be
checked separately.
We reuse the dns.TypeXXX values for this as to not invent anything new.
This checks if the next middleware to be called is nil, and if so returns
ServerFailure and an error. This makes the next calling more robust and
saves some lines of code.
Also prefix the error with the name of the middleware to aid in
debugging.
Add a Reverse method to BackendService because different backends want
to to do diff. things. This allows etc/k8s to share even more code and
we can unify the PTR handling.
* Add ServiceBackend interface
This adds a ServiceBackend interface that is shared between etcd/etcd3
(later) and kubernetes, leading to a massive reduction in code. When
returning the specific records from their backend.
Fixes#273