Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HttpClient ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
servers is the list of DNS servers that we forward to/ask
func NewServer ¶
func NewServer(cache *cache.Cache, config *config.Config, dnsClient DnsClient, httpClient HttpClient) (*Server, error)
Get a new server ready to start serving
func (*Server) HandleRequest ¶
func (s *Server) HandleRequest(dnsWriter dns.ResponseWriter, clientRequest *dns.Msg)
Handle a client request Check if there is a cache record and return it or create it Ask one of the DNS servers if the record is not in the cache
Click to show internal directories.
Click to hide internal directories.