Documentation
¶
Overview ¶
Package dnscheck implements the DNS monitor type (FA-CHK-40/41).
Index ¶
- Constants
- type Checker
- func (c *Checker) Check(ctx context.Context, env *checker.Env, raw json.RawMessage) checker.Result
- func (*Checker) ConfigSchema() json.RawMessage
- func (*Checker) Name() string
- func (*Checker) Targets(raw json.RawMessage) ([]checker.Target, error)
- func (*Checker) Type() string
- func (*Checker) Validate(raw json.RawMessage) error
- type Config
Constants ¶
View Source
const Type = "dns"
Type is the monitor type key.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Checker ¶
type Checker struct {
// SystemResolvers overrides /etc/resolv.conf (tests only).
SystemResolvers []string
}
Checker runs DNS checks.
func (*Checker) ConfigSchema ¶
func (*Checker) ConfigSchema() json.RawMessage
ConfigSchema implements checker.Checker.
type Config ¶
type Config struct {
Hostname string `json:"hostname"`
RecordType string `json:"recordType,omitempty"`
// Resolver is "ip" or "ip:port"; empty uses the node's system resolver.
Resolver string `json:"resolver,omitempty"`
Expected []string `json:"expected,omitempty"`
// MatchMode "contains" (default): every expected value is present;
// "equals": the answer set equals the expected set (order-insensitive).
MatchMode string `json:"matchMode,omitempty"`
Transport string `json:"transport,omitempty"` // udp (default) | tcp
}
Config is the DNS monitor configuration.
Click to show internal directories.
Click to hide internal directories.