53 lines
1.5 KiB
Go
53 lines
1.5 KiB
Go
package checker
|
|
|
|
import (
|
|
"time"
|
|
|
|
sdk "git.happydns.org/checker-sdk-go/checker"
|
|
)
|
|
|
|
// Version is the checker version reported in CheckerDefinition.Version.
|
|
// It defaults to "built-in"; standalone and plugin builds override it via
|
|
// -ldflags "-X .../checker.Version=...".
|
|
var Version = "built-in"
|
|
|
|
// Definition returns the CheckerDefinition for the stub TLS checker.
|
|
func Definition() *sdk.CheckerDefinition {
|
|
return &sdk.CheckerDefinition{
|
|
ID: "tls",
|
|
Name: "TLS (stub)",
|
|
Version: Version,
|
|
Availability: sdk.CheckerAvailability{
|
|
ApplyToDomain: true,
|
|
},
|
|
ObservationKeys: []sdk.ObservationKey{ObservationKeyTLSProbes},
|
|
Options: sdk.CheckerOptionsDocumentation{
|
|
UserOpts: []sdk.CheckerOptionDocumentation{
|
|
{
|
|
Id: OptionProbeTimeoutMs,
|
|
Type: "number",
|
|
Label: "Per-endpoint probe timeout (ms)",
|
|
Description: "Maximum time allowed for dial + STARTTLS + TLS handshake on a single endpoint.",
|
|
Default: float64(DefaultProbeTimeoutMs),
|
|
},
|
|
},
|
|
RunOpts: []sdk.CheckerOptionDocumentation{
|
|
{
|
|
Id: OptionEndpoints,
|
|
Label: "Discovered endpoints",
|
|
Description: "Endpoints published by other checkers for this domain; consumer filters by Type.",
|
|
AutoFill: sdk.AutoFillDiscoveredEndpoints,
|
|
Hide: true,
|
|
},
|
|
},
|
|
},
|
|
Rules: []sdk.CheckRule{
|
|
Rule(),
|
|
},
|
|
Interval: &sdk.CheckIntervalSpec{
|
|
Min: 1 * time.Minute,
|
|
Max: 1 * time.Hour,
|
|
Default: 10 * time.Minute,
|
|
},
|
|
}
|
|
}
|