Documentation ¶
Overview ¶
Package ping implements pinging based on SCMP echo messages.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { Dispatcher reliable.Dispatcher Local *snet.UDPAddr Remote *snet.UDPAddr // Attempts is the number of pings to send. Attempts uint16 // Interval is the time between sending pings. Interval time.Duration // Timeout is the time until a ping is considered to have timed out. Timeout time.Duration // PayloadSize is the size of the SCMP echo payload. PayloadSize int // ErrHandler is invoked for every error that does not cause pinging to // abort. Execution time must be small, as it is run synchronously. ErrHandler func(err error) // Update handler is invoked for every ping reply. Execution time must be // small, as it is run synchronously. UpdateHandler func(Update) }
Config configures the ping run.
Click to show internal directories.
Click to hide internal directories.