all: adding more function/type documentation

This commit is contained in:
Cuong Manh Le
2023-06-05 18:41:48 +07:00
committed by Cuong Manh Le
parent c941f9c621
commit 542c4f7daf
6 changed files with 43 additions and 15 deletions
+3
View File
@@ -470,6 +470,9 @@ func runDNSServer(addr, network string, handler dns.Handler) (*dns.Server, <-cha
return s, errCh
}
// runDNSServerForNTPD starts a DNS server listening on router.ListenAddress(). It must only be called when ctrld
// running on router, before router.PreRun() to serve DNS request for NTP synchronization. The caller must call
// s.Shutdown() explicitly when NTP is synced successfully.
func runDNSServerForNTPD() (*dns.Server, <-chan error) {
dnsResolver := ctrld.NewBootstrapResolver()
s := &dns.Server{