Documentation ¶
Index ¶
- func Traceroute(host string, opts ...TracerouteConfigOption) (chan *TracerouteResponse, error)
- type PingConfig
- type PingResult
- func PingAuto(ip string, defaultTcpPort string, timeout time.Duration, proxies ...string) *PingResult
- func PingAutoConfig(ip string, config *PingConfig) *PingResult
- func PingNative(ip string, timeout time.Duration) *PingResult
- func PingNativeBase(ip string, cxt context.Context, timeout time.Duration) *PingResult
- type TracerouteConfig
- type TracerouteConfigOption
- func WithCtx(ctx context.Context) TracerouteConfigOption
- func WithFirstTTL(ttl int) TracerouteConfigOption
- func WithLocalAddr(addr string) TracerouteConfigOption
- func WithMaxHops(hops int) TracerouteConfigOption
- func WithProtocol(protocol string) TracerouteConfigOption
- func WithReadTimeout(timeout float64) TracerouteConfigOption
- func WithRetryTimes(times int) TracerouteConfigOption
- func WithSender(...) TracerouteConfigOption
- func WithUdpPort(port int) TracerouteConfigOption
- func WithWriteTimeout(timeout float64) TracerouteConfigOption
- type TracerouteResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Traceroute ¶ added in v1.3.1
func Traceroute(host string, opts ...TracerouteConfigOption) (chan *TracerouteResponse, error)
Types ¶
type PingConfig ¶ added in v1.2.5
type PingConfig struct {
// contains filtered or unexported fields
}
type PingResult ¶
func PingAutoConfig ¶ added in v1.2.5
func PingAutoConfig(ip string, config *PingConfig) *PingResult
func PingNative ¶
func PingNative(ip string, timeout time.Duration) *PingResult
func PingNativeBase ¶ added in v1.2.5
type TracerouteConfig ¶ added in v1.3.1
type TracerouteConfig struct { Ctx context.Context MaxHops int Protocol string WriteTimeOut time.Duration ReadTimeOut time.Duration LocalAddr string RetryTimes int UdpPort int FirstTTL int Sender func(host string, hop int) (*TracerouteResponse, error) }
func NewTracerouteConfig ¶ added in v1.3.1
func NewTracerouteConfig(opts ...TracerouteConfigOption) *TracerouteConfig
type TracerouteConfigOption ¶ added in v1.3.1
type TracerouteConfigOption func(*TracerouteConfig)
func WithCtx ¶ added in v1.3.1
func WithCtx(ctx context.Context) TracerouteConfigOption
func WithFirstTTL ¶ added in v1.3.1
func WithFirstTTL(ttl int) TracerouteConfigOption
func WithLocalAddr ¶ added in v1.3.1
func WithLocalAddr(addr string) TracerouteConfigOption
func WithMaxHops ¶ added in v1.3.1
func WithMaxHops(hops int) TracerouteConfigOption
func WithProtocol ¶ added in v1.3.1
func WithProtocol(protocol string) TracerouteConfigOption
func WithReadTimeout ¶ added in v1.3.1
func WithReadTimeout(timeout float64) TracerouteConfigOption
func WithRetryTimes ¶ added in v1.3.1
func WithRetryTimes(times int) TracerouteConfigOption
func WithSender ¶ added in v1.3.1
func WithSender(f func(config *TracerouteConfig, host string, hop int) (*TracerouteResponse, error)) TracerouteConfigOption
func WithUdpPort ¶ added in v1.3.1
func WithUdpPort(port int) TracerouteConfigOption
func WithWriteTimeout ¶ added in v1.3.1
func WithWriteTimeout(timeout float64) TracerouteConfigOption
Click to show internal directories.
Click to hide internal directories.