Documentation
¶
Overview ¶
Package probe provides utilities for checking the internet connectivity of TCP and UDP clients.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TCPProbe ¶
type TCPProbe struct {
// contains filtered or unexported fields
}
TCPProbe tests the connectivity of a TCP client by sending an HTTP GET request to the configured endpoint. The response status code must be 204 No Content.
type TCPProbeConfig ¶
type TCPProbeConfig struct {
// Addr is the address of the HTTP test endpoint.
Addr conn.Addr
// EscapedPath is the escaped URL path of the HTTP test endpoint.
EscapedPath string
// Host specifies the value of the Host header field in the HTTP request.
Host string
}
TCPProbeConfig is the configuration for a TCP probe.
func (TCPProbeConfig) NewProbe ¶
func (c TCPProbeConfig) NewProbe() TCPProbe
NewProbe creates a new TCP probe from the configuration.
type UDPProbe ¶
type UDPProbe struct {
// contains filtered or unexported fields
}
UDPProbe tests the connectivity of a UDP client by sending a DNS query to the configured server. The DNS server must support the HTTPS RR type and return a response indicating success.
type UDPProbeConfig ¶
type UDPProbeConfig struct {
// Addr is the address of the UDP DNS server.
Addr conn.Addr
// Logger is the logger to use for the probe.
Logger *zap.Logger
}
UDPProbeConfig is the configuration for a UDP probe.
func (UDPProbeConfig) NewProbe ¶
func (c UDPProbeConfig) NewProbe() UDPProbe
NewProbe creates a new UDP probe from the configuration.