* plugin/hosts provide more configuration flexibility
This patch adds few features to the host plugin
* no-reverse (both as first argument on the plugin line and inline)
disable the automatic generation of reserve entries for hosts
* ttl <duration> (inline only atm)
allows to change the default ttl (default 5 minutes)
* reload <duration> (inline only atm)
allows to change the reloading interval (default 5s)
* plugin/hosts remove superfluous parameters to parse
* plugin/host: parse file without holding lock
Parse first and then swap the maps *while* holding the lock.
Signed-off-by: Miek Gieben <miek@miek.nl>
* add back in the parse function, but now purely for testing
Signed-off-by: Miek Gieben <miek@miek.nl>
This fix add inline support for middleware/hosts so that
it is possible to specify hosts file insides the Corefile:
```
hosts inline example.org {
10.0.0.1 example.org
fallthrough
}
```
This fix fixes 999.
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* 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
2017-09-14 09:36:06 +01:00
Renamed from middleware/hosts/hostsfile.go (Browse further)