Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrNotAuthoritative is returned by Transfer() when the plugin is not authoritative for the zone. ErrNotAuthoritative = errors.New("not authoritative for zone") )
Functions ¶
This section is empty.
Types ¶
type Transfer ¶
type Transfer struct { Transferers []Transferer // List of plugins that implement Transferer Next plugin.Handler // contains filtered or unexported fields }
Transfer is a plugin that handles zone transfers.
type Transferer ¶
type Transferer interface { // Transfer returns a channel to which it writes responses to the transfer request. // If the plugin is not authoritative for the zone, it should immediately return the // transfer.ErrNotAuthoritative error. This is important otherwise the transfer plugin can // use plugin X while it should transfer the data from plugin Y. // // If serial is 0, handle as an AXFR request. Transfer should send all records // in the zone to the channel. The SOA should be written to the channel first, followed // by all other records, including all NS + glue records. The implemenation is also responsible // for sending the last SOA record (to signal end of the transfer). This plugin will just grab // these records and send them back to the requester, there is little validation done. // // If serial is not 0, it will be handled as an IXFR request. If the serial is equal to or greater (newer) than // the current serial for the zone, send a single SOA record to the channel and then close it. // If the serial is less (older) than the current serial for the zone, perform an AXFR fallback // by proceeding as if an AXFR was requested (as above). Transfer(zone string, serial uint32) (<-chan []dns.RR, error) }
Transferer may be implemented by plugins to enable zone transfers
Click to show internal directories.
Click to hide internal directories.