internal

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GatherLatencies

func GatherLatencies(url string, results chan<- Result, doneC <-chan struct{})

The latency response value is obtained through a channel.

func GetRecordIPv4 added in v0.0.4

func GetRecordIPv4(domainName string) ([]string, error)

Get only ipv4 values, not ipv6

func PrintFunc

func PrintFunc(field, value string)

Title text is displayed in black letters.

func PrintSplitFunc

func PrintSplitFunc(word, field string)

Split long titles to fit output format.

func ResolveHttp added in v0.0.4

func ResolveHttp(addr *Address, opt *ReqOptions) error

Applied when using HTTP protocol.

func ResolveHttps added in v0.0.4

func ResolveHttps(addr *Address, opt *ReqOptions) error

Applied when using HTTPS protocol.

func SetTransport added in v0.0.4

func SetTransport(domainName, ip string) http.Transport

Types

type Address added in v0.0.4

type Address struct {
	IP         string `json:"ip"`
	Url        string `json:"url"`
	DomainName string `json:"domainName"`
	Target     string `json:"target"`
}

Structure with fields for address information.

type ReqOptions added in v0.0.4

type ReqOptions struct {
	Host      string `json:"domain-host"`
	Referer   string `json:"referer"`
	ByteRange string `json:"range"`
	Port      int    `json:"port"`
	Transport http.Transport
}

A structure with fields required for request options, range is fixed as byte=0-1 by default.

type ResolveResponse added in v0.0.4

type ResolveResponse struct {
	// contains filtered or unexported fields
}

Structure with response status code as field.

type Result

type Result struct {
	URL     string
	Latency int
}

A structure that has the target URL and response latency from the URL as fields.

Jump to

Keyboard shortcuts

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