Documentation ¶
Overview ¶
Package dnscheck contains types and utilities for checking if a particular client uses the DNS server.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Interface ¶
type Interface interface { // Check saves the information about a client's request and returns the // appropriate response. If req is not the right type of request or not // a request for the appropriate check domain, both resp and err are nil. // // All arguments must be non-nil. req must contain one question, which // should be either an A or an AAAA one. Check(ctx context.Context, req *dns.Msg, ri *agd.RequestInfo) (resp *dns.Msg, err error) }
Interface is the DNS checker interface. All methods must be safe for concurrent use.
type RemoteKV ¶
type RemoteKV struct {
// contains filtered or unexported fields
}
RemoteKV is the RemoteKV KV based DNS checker.
func NewRemoteKV ¶
func NewRemoteKV(c *RemoteKVConfig) (cc *RemoteKV)
NewRemoteKV creates a new remote KV based DNS checker. c must be non-nil.
type RemoteKVConfig ¶
type RemoteKVConfig struct { // Messages is the message constructor used to create DNS responses with // IPv4 and IPv6 IPs. Messages *dnsmsg.Constructor // RemoteKV for DNS server checking. RemoteKV remotekv.Interface // ErrColl is the error collector that is used to collect non-critical // errors. ErrColl errcoll.Interface // Domains are the lower-cased domain names used to detect DNS check requests. Domains []string // NodeLocation is the location of this server node. NodeLocation string // NodeName is the name of this server node. NodeName string // IPv4 are the IPv4 addresses to respond with to A requests. IPv4 []netip.Addr // IPv6 are the IPv6 addresses to respond with to AAAA requests. IPv6 []netip.Addr }
RemoteKVConfig is the configuration structure for remote KV based DNS checker. All fields must be non-empty.
Click to show internal directories.
Click to hide internal directories.