Migrate to checker-sdk-go v1.3.0 with standalone build tag
The SDK split the HTTP server scaffolding into the new checker-sdk-go/checker/server subpackage and CheckRule.Evaluate now returns []CheckState. Update main.go to import server and call server.New, switch the rule and the package-level Evaluate helper to the new slice return type, and isolate the interactive form code behind the standalone build tag so plugin/builtin builds skip net/http and html/template entirely.
This commit is contained in:
parent
00de0f9780
commit
d4c1ac348a
10 changed files with 157 additions and 18 deletions
|
|
@ -19,7 +19,7 @@ const dnsTimeout = 5 * time.Second
|
|||
|
||||
// dnsExchange sends a single query to the given server using the requested
|
||||
// transport ("" for UDP, "tcp"). The server address must already include a
|
||||
// port. RecursionDesired is forced off — this checker only talks to
|
||||
// port. RecursionDesired is forced off, this checker only talks to
|
||||
// authoritative servers.
|
||||
func dnsExchange(ctx context.Context, proto, server string, q dns.Question, edns bool) (*dns.Msg, error) {
|
||||
client := dns.Client{Net: proto, Timeout: dnsTimeout}
|
||||
|
|
@ -77,7 +77,7 @@ func resolveHost(ctx context.Context, host string) ([]string, error) {
|
|||
// resolver returns NOERROR with an answer.
|
||||
//
|
||||
// If hintParent is non-empty, it is used as the assumed parent and we only
|
||||
// resolve its NS — this matches happyDomain's data model where the parent
|
||||
// resolve its NS, this matches happyDomain's data model where the parent
|
||||
// zone is known.
|
||||
func findParentZone(ctx context.Context, fqdn, hintParent string) (zone string, servers []string, err error) {
|
||||
zone = dns.Fqdn(hintParent)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue