Documentation
¶
Overview ¶
Package probe measures the network: ICMP, TCP and UDP round trips, and Paris traceroutes.
Index ¶
Constants ¶
View Source
const DefaultTracePort = 33434
DefaultTracePort is the classic traceroute destination port.
Variables ¶
This section is empty.
Functions ¶
func ValidateTrace ¶
ValidateTrace checks a spec before it is scheduled.
Types ¶
type Env ¶
type Env struct {
Host string // target name, for the HTTP Host header and TLS
Privileged bool // raw ICMP sockets allowed
}
Env is what the edge knows beyond the spec of a check.
type Resolution ¶
type Resolution struct {
IP netip.Addr
Latency time.Duration
Looked bool // false for a literal address
Err error
}
Resolution is the outcome of one lookup.
type Result ¶
type Result struct {
Sent int
Received int
RTTs []time.Duration // answered samples, in order
Err error // last error, for diagnostics
Metrics map[string]float64
}
Result is one cycle of samples.
type TraceSpec ¶
type TraceSpec struct {
Protocol check.Protocol // check.TraceUDP or check.TraceICMP
Port int // udp destination, 0 for DefaultTracePort
LocalPort int // udp source, 0 for ephemeral
MaxHops int
Count int // probes per hop
Timeout time.Duration // per probe
// Called before each probe, for rate limiting. Optional.
Wait func(ctx context.Context) error
}
TraceSpec describes a traceroute.
Click to show internal directories.
Click to hide internal directories.