Documentation
¶
Overview ¶
Package nspolicy store the NS record policies for DNS configuration checks
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DomainNSPolicy ¶
type DomainNSPolicy struct {
// contains filtered or unexported fields
}
DomainNSPolicy store the domain object and the version of the DNS zone. This is necessary because we need to check the DNS zone version on each nameserver and detect if they are different
func NewDomainNSPolicy ¶
func NewDomainNSPolicy(domain *model.Domain) DomainNSPolicy
This function initialize a DomainNSPolicy object, it was created to force the programmer to initialize the domain object, so we don't need to check if domain is nil inside each method. Maybe there's a better approach (think about)
func (*DomainNSPolicy) CheckNetworkError ¶
func (d *DomainNSPolicy) CheckNetworkError(err error) model.NameserverStatus
When there's a error while sending a nameserver request over the network, this method is responsable for detecting any usual problems. There's also some unknown problems that are going to be treated as DNS error, for now we are not logging the generic error, but maybe is a good idea if occurs too often
func (*DomainNSPolicy) Run ¶
func (d *DomainNSPolicy) Run(dnsResponseMessage *dns.Msg) model.NameserverStatus
Method responsable for running all nameserver policies. It will return the nameserver status of the first error that occurred