dial

package
v0.0.0-...-a74421f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 8, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DnsSourceTypeLocal = iota
	DnsSourceTypeHttp
	DnsSourceTypeGoogle
)
View Source
const (
	DnsRecordTypeA     = 1
	DnsRecordTypeAAAA  = 28
	DnsRecordTypeCNAME = 5
)

Variables

This section is empty.

Functions

func DoDns

func DoDns(dnsOptions *DnsOptions, args []string) (err error)

func DoPing

func DoPing(pingOptions *PingOptions, args []string) (err error)

func ParseIP

func ParseIP(s string) (net.IP, int)

Types

type DnsOptions

type DnsOptions struct {
	DnsSourceType int
	DnsRecordType int
	DnsServer     string
	SaveTests     bool
}

type DnsResult

type DnsResult struct {
	DnsList       []string `json:"dnsList"`
	DnsSource     int      `json:"dnsType"`
	DnsRecordType int      `json:"dnsRecordType"`
	DnsServer     string   `json:"dnsServer,omitempty"`
	Ttl           int      `json:"ttl"`
	Suc           bool     `json:"suc"`
	ErrMsg        string   `json:"errMsg"`
}

type PingOptions

type PingOptions struct {
	Count     int
	Timeout   time.Duration
	Interval  time.Duration
	SaveTests bool
}

type PingResult

type PingResult struct {
	Suc                bool   `json:"suc"`
	ErrMsg             string `json:"errMsg"`
	Ip                 string `json:"ip"`
	AvgCost            int    `json:"avgCost"`
	MaxCost            int    `json:"maxCost"`
	MinCost            int    `json:"minCost"`
	Lost               int    `json:"lost"`
	PingCount          int    `json:"pingCount"`
	PacketSize         int    `json:"packetSize"`
	ReceivePacketCount int    `json:"receivePacketCount"`
	SendPacketCount    int    `json:"sendPacketCount"`
	SuccessCount       int    `json:"successCount"`
	DebugLog           string `json:"debugLog"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL