Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatIP ¶
FormatIP - trim spaces and format IP
IP - the provided IP ¶
string - return "" if the input is neither valid IPv4 nor valid IPv6
return IPv4 in format like "192.168.9.1" return IPv6 in format like "[2002:ac1f:91c5:1::bd59]"
func UseCustomeDNS ¶
func UseCustomeDNS(dns []string)
UseCustomeDNS will set the dns to default DNS resolver for global
Types ¶
type HTTPing ¶
type HTTPing struct { Method string // contains filtered or unexported fields }
HTTPing ...
type Ping ¶
type Ping interface { Start() <-chan struct{} Host() string Port() int Protocol() Protocol Counter() int Stop() Result() Result }
Ping is a ping interface
type Protocol ¶
type Protocol int
Protocol ...
func NewProtocol ¶
NewProtocol convert protocol stirng to Protocol
type Result ¶
type Result struct { Counter int SuccessCounter int RemoteAddr string Target *Target MinDuration time.Duration MaxDuration time.Duration TotalDuration time.Duration }
Result ...
Click to show internal directories.
Click to hide internal directories.