Documentation
¶
Index ¶
- Constants
- type Component
- func (c *Component) GetCheckConfig() *checks.CEL
- func (c *Component) GetCheckContext(ctx context.Context) (map[string]any, error)
- func (c *Component) GetHealth(ctx context.Context) *ph.HealthCheckResponse
- func (c *Component) GetType() string
- func (c *Component) LogValue() slog.Value
- func (c *Component) SetChecks(exprs []checks.Expression) error
- func (c *Component) Setup() error
Constants ¶
View Source
const ( ProviderType = "dns" DefaultTimeout = 5 * time.Second )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Component ¶
type Component struct {
provider.Base
provider.BaseWithChecks
Host string `mapstructure:"host"`
Server string `mapstructure:"server"` // DNS server IP (no port)
Port int `mapstructure:"port" default:"0"` // 0 = auto (53/853 based on TLS)
ServerName string `mapstructure:"serverName"` // TLS server name (for DoT with IP addresses)
Type string `mapstructure:"type" default:"A"`
TLS bool `mapstructure:"tls"`
DNSSEC bool `mapstructure:"dnssec"`
Detail bool `mapstructure:"detail"`
}
func (*Component) GetCheckConfig ¶
GetCheckConfig returns the DNS provider's CEL variable declarations.
func (*Component) GetCheckContext ¶
GetCheckContext performs a DNS query and returns the CEL evaluation context.
func (*Component) GetHealth ¶
func (c *Component) GetHealth(ctx context.Context) *ph.HealthCheckResponse
Click to show internal directories.
Click to hide internal directories.