Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(*Pinger)
Option is a configuration function for Pinger.
func WithLogger ¶ added in v0.3.0
WithLogger provides a logger to use for logging.
func WithMaxChildProcesses ¶ added in v0.3.0
WithMaxChildProcesses sets the maximum number of ping commands that can be run concurrently. This helps avoid an easy DoS target.
func WithPacketConnFactory ¶ added in v0.4.0
func WithPacketConnFactory(factory PacketConnFactory) Option
WithPacketConnFactory allows the use of a custom PacketConnFactory.
func WithResolver ¶ added in v0.3.0
WithResolver provides a DNS Resolver to use for resolving hostnames.
type PacketConnFactory ¶ added in v0.4.0
type PacketConnFactory func(network string) (net.PacketConn, error)
PacketConnFactory is a factory function for creating ICMP PacketConns. Known networks are "ip", "ip4", and "ip6".
Click to show internal directories.
Click to hide internal directories.