Пример #1
0
func setupRootZone() {
	dns.HandleFunc(".", func(w dns.ResponseWriter, r *dns.Msg) {
		m := new(dns.Msg)
		m.SetRcode(r, dns.RcodeRefused)
		w.WriteMsg(m)
	})
}
Пример #2
0
func addHandler(zones Zones, name string, config *Zone) {
	oldZone := zones[name]
	config.SetupMetrics(oldZone)
	zones[name] = config
	dns.HandleFunc(name, setupServerFunc(config))
}