mirror of
https://github.com/coredns/coredns.git
synced 2025-11-01 02:33:14 -04:00
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>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user