feat: Add support for multiple resolvers

This commit is contained in:
Karan Sharma 2020-12-15 23:09:10 +05:30
parent 80d43011f8
commit b46b64c1ae
13 changed files with 332 additions and 226 deletions

View file

@ -7,14 +7,14 @@ import (
)
// Resolver implements the configuration for a DNS
// Client. Different types of client like (UDP/TCP/DOH/DOT)
// can be initialised.
// Client. Different types of providers can load
// a DNS Resolver satisfying this interface.
type Resolver interface {
Lookup([]dns.Question) ([]Response, error)
}
// Response represents a custom output format
// which wraps certain metadata about the DNS query
// for DNS queries. It wraps metadata about the DNS query
// and the DNS Answer as well.
type Response struct {
Message dns.Msg