Documentation ¶
Overview ¶
Package ping provides a facility for pinging hosts that uses the installed ping command rather than Go's ICMP support, enabling basic pinging without needing administrator/root privileges.
Index ¶
Constants ¶
View Source
const ( // DefaultCount is 1 DefaultCount = 1 // DefaultPayloadSize is 56 bytes DefaultPayloadSize = 56 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Opts ¶
type Opts struct { // Count is the number of times to ping (defaults to 1) Count int // PayloadSize is the size of the data field in the ICMP packet, defaults to 1472 (for a 1500 byte total packet) PayloadSize int }
Opts specifies options for pinging
type Stats ¶
type Stats struct { // RTT Minimum milliseconds RTTMin float64 // RTT Average milliseconds RTTAvg float64 // RTT Maximum milliseconds RTTMax float64 // Packet Loss Rate (ratio, not percent) PLR float64 }
Stats represents the statistics of pinging a host
Click to show internal directories.
Click to hide internal directories.