Versions in this module Expand all Collapse all v1 v1.0.0 Jan 5, 2023 Changes in this version + type Logger interface + Debugf func(format string, v ...interface{}) + Errorf func(format string, v ...interface{}) + Fatalf func(format string, v ...interface{}) + Infof func(format string, v ...interface{}) + Warnf func(format string, v ...interface{}) + type NoopLogger struct + func (l NoopLogger) Debugf(format string, v ...interface{}) + func (l NoopLogger) Errorf(format string, v ...interface{}) + func (l NoopLogger) Fatalf(format string, v ...interface{}) + func (l NoopLogger) Infof(format string, v ...interface{}) + func (l NoopLogger) Warnf(format string, v ...interface{}) + type Packet struct + Addr string + ID int + IPAddr *net.IPAddr + Nbytes int + Rtt time.Duration + Seq int + TTL int + type Pinger struct + Count int + Debug bool + Interval time.Duration + OnDuplicateRecv func(*Packet) + OnFinish func(*Statistics) + OnRecv func(*Packet) + OnSend func(*Packet) + OnSetup func() + PacketsRecv int + PacketsRecvDuplicates int + PacketsSent int + RecordRtts bool + Size int + Source string + TTL int + Timeout time.Duration + Tracker uint64 + func New(addr string) *Pinger + func NewPinger(addr string) (*Pinger, error) + func (p *Pinger) Addr() string + func (p *Pinger) ID() int + func (p *Pinger) IPAddr() *net.IPAddr + func (p *Pinger) Privileged() bool + func (p *Pinger) Resolve() error + func (p *Pinger) Run() error + func (p *Pinger) SetAddr(addr string) error + func (p *Pinger) SetID(id int) + func (p *Pinger) SetIPAddr(ipaddr *net.IPAddr) + func (p *Pinger) SetLogger(logger Logger) + func (p *Pinger) SetNetwork(n string) + func (p *Pinger) SetPrivileged(privileged bool) + func (p *Pinger) Statistics() *Statistics + func (p *Pinger) Stop() + type Statistics struct + Addr string + AvgRtt time.Duration + IPAddr *net.IPAddr + MaxRtt time.Duration + MinRtt time.Duration + PacketLoss float64 + PacketsRecv int + PacketsRecvDuplicates int + PacketsSent int + Rtts []time.Duration + StdDevRtt time.Duration + type StdLogger struct + Logger *log.Logger + func (l StdLogger) Debugf(format string, v ...interface{}) + func (l StdLogger) Errorf(format string, v ...interface{}) + func (l StdLogger) Fatalf(format string, v ...interface{}) + func (l StdLogger) Infof(format string, v ...interface{}) + func (l StdLogger) Warnf(format string, v ...interface{})