Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CachingResolver ¶ added in v0.2.2
type CachingResolver interface { Resolver ChangedRecords() []string ResolveErrors() []error Save(filename string) error }
CachingResolver wraps a live resolver and adds caching to it. GetSPF will always return the cached value, if present. It will also query the inner resolver and compare results. If a given lookup has inconsistencies between cache and live, GetSPF will return the cached result. All records queries will be stored for the lifetime of the resolver, and can be flushed to disk at the end. All resolution errors from the inner resolver will be saved and can be retreived later.
func NewCache ¶ added in v0.2.2
func NewCache(filename string) (CachingResolver, error)
type LiveResolver ¶ added in v0.2.2
type LiveResolver struct{}
LiveResolver simply queries DNS to resolve SPF records.
type SPFRecord ¶
type SPFRecord struct {
Parts []*SPFPart
}
func (*SPFRecord) TXTSplit ¶ added in v0.2.2
TXTSplit returns a set of txt records to use for SPF. pattern given is used to name all chained spf records. patern should include %d, which will be replaced by a counter. should result in fqdn after replacement returned map will have keys with fqdn of resulting records. root record will be under key "@"