Documentation
¶
Index ¶
- func Err(err error) slog.Attr
- type Dbfile
- func (h *Dbfile) Err(err error) error
- func (d *Dbfile) HandlerFunc(next dns.HandlerFunc) dns.HandlerFunc
- func (d *Dbfile) HandlerFuncNotify(ctx context.Context, w dns.ResponseWriter, r *dns.Msg)
- func (d *Dbfile) HandlerFuncTransfer(ctx context.Context, w dns.ResponseWriter, r *dns.Msg)
- func (h *Dbfile) Key() string
- func (d *Dbfile) Reload() error
- func (d *Dbfile) Retransfer() error
- func (d *Dbfile) Setup(co *dnsserver.Controller) error
- func (d *Dbfile) SetupTransfer(co *dnsserver.Controller) (err error)
- func (d *Dbfile) TransferIn(origin string) error
- func (d *Dbfile) Zone(origin string) *zone.Zone
- type Transfer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Dbfile ¶
type Dbfile struct {
Path string
// Zones holds all the zone this instance of Dbfile is called for.
Zones map[string]*zone.Zone
sync.RWMutex // protects Zones
To *Transfer
From *Transfer
// contains filtered or unexported fields
}
func (*Dbfile) HandlerFunc ¶
func (d *Dbfile) HandlerFunc(next dns.HandlerFunc) dns.HandlerFunc
func (*Dbfile) HandlerFuncNotify ¶ added in v0.5.1
func (*Dbfile) HandlerFuncTransfer ¶ added in v0.5.1
func (*Dbfile) Reload ¶
Reload launches a reload routine that listens for _write_ events to the zone files.
func (*Dbfile) Retransfer ¶ added in v0.5.0
func (*Dbfile) SetupTransfer ¶
func (d *Dbfile) SetupTransfer(co *dnsserver.Controller) (err error)
Setup transfer handles the transfer options.
func (*Dbfile) TransferIn ¶ added in v0.5.0
type Transfer ¶
type Transfer struct {
IPs []string
TSIG *dns.TSIG
TSIGSecret string // base64
Notifies []string
Sources []string
}
Transfer holds all the information to perform in incoming or outgoing zone transfer. The families from IPs, notifies and sources will be matched upon sending the actual notifies.
func (*Transfer) AvailableFrom ¶ added in v0.5.0
AvailableFrom return true if the "other side" has a newer SOA then we have. The first IP that answers with a higher serial is enough to return true.
func (*Transfer) SetupTransferTSIG ¶
func (t *Transfer) SetupTransferTSIG(co *dnsserver.Controller) error
SetuptransferTSIG handles the transfer tsig option.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.