Documentation ¶
Index ¶
- type PingData
- func (pr *PingData) Add(hosts ...netip.Addr)
- func (pr *PingData) Append(data *PingData)
- func (pr *PingData) Count() int
- func (pr *PingData) Del(hosts ...netip.Addr)
- func (pr *PingData) Dump(w io.Writer, title ...string)
- func (pr *PingData) Flush()
- func (pr *PingData) Get(ip netip.Addr) (*PingStats, bool)
- func (pr *PingData) Iterate(callback func(ip netip.Addr, val *PingStats))
- func (pr *PingData) Reset()
- type PingStats
- func (s *PingStats) Duplicate() uint
- func (s *PingStats) Latency() float32
- func (s *PingStats) Loss() float32
- func (s *PingStats) Recv(seq uint16, rtt time.Duration)
- func (s *PingStats) Reset()
- func (s *PingStats) Rtt() time.Duration
- func (s *PingStats) Send(seq uint16)
- func (s *PingStats) String() string
- func (s *PingStats) Valid() bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PingData ¶
type PingData struct {
// contains filtered or unexported fields
}
Ping data. Holds host information and ping statistics. Use Add, Get and Iterate functions. No internal logic will be exposed.
func NewPingData ¶
func NewPingData() *PingData
Click to show internal directories.
Click to hide internal directories.