Documentation ¶
Overview ¶
Package traceroute adds traceroute functionality to the agent
Index ¶
Constants ¶
const ( // DefaultSourcePort defines the default source port DefaultSourcePort = 12345 // DefaultDestPort defines the default destination port DefaultDestPort = 33434 // DefaultNumPaths defines the default number of paths DefaultNumPaths = 1 // DefaultMinTTL defines the default minimum TTL DefaultMinTTL = 1 // DefaultDelay defines the default delay DefaultDelay = 50 //msec // DefaultOutputFormat defines the default output format DefaultOutputFormat = "json" )
Variables ¶
This section is empty.
Functions ¶
func GetHostname ¶
GetHostname returns the hostname for the given IP address as a string.
func GetReverseDNSForIP ¶
GetReverseDNSForIP returns the reverse DNS for the given IP address as a net.IP.
Types ¶
type Config ¶
type Config struct { // TODO: add common configuration // Destination Hostname DestHostname string // Destination Port number DestPort uint16 // Destination service name DestinationService string // Source service name SourceService string // Source container ID SourceContainerID string // Max number of hops to try MaxTTL uint8 // TODO: do we want to expose this? Timeout time.Duration // Protocol is the protocol to use // for traceroute, default is UDP Protocol payload.Protocol }
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, _ telemetry.Component) (*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 NewRunner ¶
func NewRunner(telemetryComp telemetryComponent.Component) (*Runner, error)
NewRunner initializes a new traceroute runner
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