diff options
author | 2021-07-09 11:12:06 -0400 | |
---|---|---|
committer | 2021-07-09 17:12:06 +0200 | |
commit | bdaa2a55271f88e2bf94ee146e90562f8aa57b34 (patch) | |
tree | 8f5762b28b9faa96fda1b0e7f414fecf50a23c00 /core/dnsserver/config.go | |
parent | 2a61309cad794848e247e2d3de7369b96e12efd1 (diff) | |
download | coredns-bdaa2a55271f88e2bf94ee146e90562f8aa57b34.tar.gz coredns-bdaa2a55271f88e2bf94ee146e90562f8aa57b34.tar.zst coredns-bdaa2a55271f88e2bf94ee146e90562f8aa57b34.zip |
Share plugins among zones in the same server block (#4593)
* share plugins among zones in the same server block
Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
* update caddy dep
Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
* simp code
Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
* copy ListenHosts and Debug from first config
Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
* copy tls configs from first config
Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
* add test to validate debug setting is replicated to all configs in block
Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
* stop server
Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
Diffstat (limited to 'core/dnsserver/config.go')
-rw-r--r-- | core/dnsserver/config.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/core/dnsserver/config.go b/core/dnsserver/config.go index d0a432a85..e5200d67c 100644 --- a/core/dnsserver/config.go +++ b/core/dnsserver/config.go @@ -50,6 +50,10 @@ type Config struct { // on them should register themselves here. The name should be the name as return by the // Handler's Name method. registry map[string]plugin.Handler + + // firstConfigInBlock is used to reference the first config in a server block, for the + // purpose of sharing single instance of each plugin among all zones in a server block. + firstConfigInBlock *Config } // keyForConfig builds a key for identifying the configs during setup time |