tracer

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 1, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HopResult

type HopResult struct {
	Target    string
	Hop       int
	Address   string
	Hostname  string
	Latency   time.Duration
	Timestamp time.Time
}

HopResult represents the result of a single hop in a traceroute

type Tracer

type Tracer struct {
	// contains filtered or unexported fields
}

Tracer handles hop-by-hop traceroutes

func NewTracer

func NewTracer() *Tracer

NewTracer creates a new traceroute handler

func (*Tracer) AnalyzeLatency

func (t *Tracer) AnalyzeLatency(host string, db *storage.Database) (map[int]time.Duration, error)

AnalyzeLatency calculates average latency per hop for a target

func (*Tracer) TraceHost

func (t *Tracer) TraceHost(ctx context.Context, host string, db *storage.Database) error

TraceHost performs a traceroute to a single host

func (*Tracer) TraceHosts

func (t *Tracer) TraceHosts(ctx context.Context, hosts []string, db *storage.Database)

TraceHosts traces routes to a list of target hosts

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL