Documentation
¶
Overview ¶
Example ¶
package main
import (
"fmt"
"log"
"github.com/moomerman/zap/dns"
)
func main() {
port := 9253
domains := []string{"test", "dev"}
if err := dns.ConfigureResolver(domains, port, "example"); err != nil {
log.Println(err)
panic("couldn't configure resolver")
}
var dns dns.Responder
dns.Address = fmt.Sprintf("127.0.0.1:%d", port)
log.Println("* DNSServer", dns.Address)
dns.Serve(domains)
}
Index ¶
Examples ¶
Constants ¶
View Source
const DefaultAddress = ":9253"
DefaultAddress is the default address for the DNS server
Variables ¶
This section is empty.
Functions ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.