mirror of
https://github.com/coredns/coredns.git
synced 2026-07-18 05:30:13 -04:00
plugin/secondary: parse catalog zones after transfer (#8209)
This commit is contained in:
@@ -1,13 +1,22 @@
|
||||
// Package secondary implements a secondary plugin.
|
||||
package secondary
|
||||
|
||||
import "github.com/coredns/coredns/plugin/file"
|
||||
import (
|
||||
"sync"
|
||||
|
||||
"github.com/coredns/coredns/plugin/file"
|
||||
"github.com/coredns/coredns/plugin/pkg/catalog"
|
||||
)
|
||||
|
||||
// Secondary implements a secondary plugin that allows CoreDNS to retrieve (via AXFR)
|
||||
// zone information from a primary server.
|
||||
type Secondary struct {
|
||||
file.File
|
||||
|
||||
catalogMu sync.RWMutex
|
||||
catalogs map[string]*catalog.Catalog
|
||||
catalogZones map[string]struct{}
|
||||
}
|
||||
|
||||
// Name implements the Handler interface.
|
||||
func (s Secondary) Name() string { return "secondary" }
|
||||
func (s *Secondary) Name() string { return "secondary" }
|
||||
|
||||
Reference in New Issue
Block a user