Documentation ¶
Overview ¶
Package traceroute adds traceroute functionality to the agent
Index ¶
Constants ¶
const ( DefaultSourcePort = 12345 DefaultDestPort = 33434 DefaultNumPaths = 1 DefaultMinTTL = 1 DefaultMaxTTL = 30 DefaultDelay = 50 //msec DefaultReadTimeout = 10 * time.Second DefaultOutputFormat = "json" )
TODO: are these good defaults?
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // TODO: add common configuration // Destination Hostname DestHostname string // Destination Port number DestPort uint16 // Max number of hops to try MaxTTL uint8 // TODO: do we want to expose this? TimeoutMs uint }
Config specifies the configuration of an instance of Traceroute
type LinuxTraceroute ¶
type LinuxTraceroute struct {
// contains filtered or unexported fields
}
LinuxTraceroute defines a structure for running traceroute from an agent running on Linux
func New ¶
func New(cfg Config) (*LinuxTraceroute, error)
New creates a new instance of LinuxTraceroute based on an input configuration
func (*LinuxTraceroute) Run ¶
func (l *LinuxTraceroute) Run(_ context.Context) (payload.NetworkPath, error)
Run executes a traceroute
type Runner ¶
type Runner struct {
// contains filtered or unexported fields
}
Runner executes traceroutes
func (*Runner) RunTraceroute ¶
RunTraceroute wraps the implementation of traceroute so it can be called from the different OS implementations
This code is experimental and will be replaced with a more complete implementation.
type Traceroute ¶
type Traceroute interface {
Run(context.Context) (payload.NetworkPath, error)
}
Traceroute defines an interface for running traceroutes for the Network Path integration