52 lines
1.3 KiB
Go
52 lines
1.3 KiB
Go
// SPDX-License-Identifier: MIT
|
|
|
|
package checker
|
|
|
|
import (
|
|
"time"
|
|
|
|
sdk "git.happydns.org/checker-sdk-go/checker"
|
|
)
|
|
|
|
// Version is overridden at link time: -ldflags "-X ...Version=1.2.3".
|
|
var Version = "built-in"
|
|
|
|
func (p *dnsvizProvider) Definition() *sdk.CheckerDefinition {
|
|
def := &sdk.CheckerDefinition{
|
|
ID: "dnsviz",
|
|
Name: "DNSSEC (DNSViz)",
|
|
Version: Version,
|
|
Availability: sdk.CheckerAvailability{
|
|
ApplyToDomain: true,
|
|
},
|
|
ObservationKeys: []sdk.ObservationKey{ObservationKeyDNSViz},
|
|
Options: sdk.CheckerOptionsDocumentation{
|
|
AdminOpts: []sdk.CheckerOptionDocumentation{
|
|
{
|
|
Id: "probeTimeoutSeconds",
|
|
Type: "uint",
|
|
Label: "Probe timeout (s)",
|
|
Description: "Hard timeout for the `dnsviz probe` invocation. The recursive walk can take a while on slow zones.",
|
|
Default: float64(120),
|
|
},
|
|
},
|
|
DomainOpts: []sdk.CheckerOptionDocumentation{
|
|
{
|
|
Id: "domain_name",
|
|
Label: "Domain name",
|
|
AutoFill: sdk.AutoFillDomainName,
|
|
},
|
|
},
|
|
},
|
|
Rules: Rules(),
|
|
HasHTMLReport: true,
|
|
HasMetrics: true,
|
|
Interval: &sdk.CheckIntervalSpec{
|
|
Min: 15 * time.Minute,
|
|
Max: 7 * 24 * time.Hour,
|
|
Default: 6 * time.Hour,
|
|
},
|
|
}
|
|
def.BuildRulesInfo()
|
|
return def
|
|
}
|