mirror of
https://github.com/coredns/coredns.git
synced 2026-08-20 23:08:28 -04:00
plugin/hosts: pre-convert Origins to plugin.Zones in setup (#8383)
* test: add benchmark cases for Request IP/Port and parseRequest Signed-off-by: Manuel Rüger <manuel@rueg.eu> * test(kubernetes): add BenchmarkServices and BenchmarkServicesHeadless Signed-off-by: Manuel Rüger <manuel@rueg.eu> * perf(hosts): pre-convert Origins to plugin.Zones in hosts setup Signed-off-by: Manuel Rüger <manuel@rueg.eu> * style: fix gofmt trailing line formatting Signed-off-by: Manuel Rüger <manuel@rueg.eu> --------- Signed-off-by: Manuel Rüger <manuel@rueg.eu>
This commit is contained in:
@@ -107,6 +107,7 @@ func hostsParse(c *caddy.Controller) (Hosts, error) {
|
||||
}
|
||||
|
||||
h.Origins = plugin.OriginsFromArgsOrServerBlock(args, c.ServerBlockKeys)
|
||||
h.zones = plugin.Zones(h.Origins)
|
||||
|
||||
for c.NextBlock() {
|
||||
switch c.Val() {
|
||||
|
||||
Reference in New Issue
Block a user