internal

package
v1.2.6 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2023 License: MIT Imports: 18 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 GatherLatenciesOnDashBoard added in v1.1.15

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

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 QueryDnsRecord added in v1.2.5

func QueryDnsRecord() ([]string, error)

func ResolveHTTP added in v1.1.14

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

Applied when using HTTP protocol.

func ResolveHTTPS added in v1.1.14

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"`
	Authorization string `json:"authorization"`
	Referer       string `json:"referer"`
	ByteRange     string `json:"range"`
	Port          int    `json:"port"`
	Transport     http.Transport
	AttackMode    bool `json:"attack-mode"`
	RequestCount  int
}

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

func (*ReqOptions) GetRequestCount added in v1.1.16

func (ro *ReqOptions) GetRequestCount() string

type ResolveResponse added in v0.0.4

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

Structure with response status code as field.

type Response

type Response struct {
	StatusCode    int    `json:"Status"`
	Server        string `json:"Server"`
	Date          string `json:"Date"`
	LastModified  string `json:"Last-Modified"`
	Etag          string `json:"Etag"`
	Age           string `json:"Age"`
	Expires       string `json:"Expires"`
	CacheControl  string `json:"Cache-Control"`
	ContentType   string `json:"Content-Type"`
	ContentLength string `json:"Content-Length"`
	ACAOrigin     string `json:"Access-Control-Allow-Origin"`
	Via           string `json:"Via"`
	EdgeIP        string
	Hash          []byte
	Error         error
}

func GetStatusCodeOnHTTP added in v1.1.14

func GetStatusCodeOnHTTP(addr *Address, opt *ReqOptions) *Response

func GetStatusCodeOnHTTPS added in v1.1.14

func GetStatusCodeOnHTTPS(addr *Address, opt *ReqOptions) *Response

func (Response) GetACAOrigin added in v1.1.15

func (r Response) GetACAOrigin() string

func (Response) GetAge added in v1.1.15

func (r Response) GetAge() string

func (Response) GetCacheControl added in v1.1.15

func (r Response) GetCacheControl() string

func (Response) GetContentLength added in v1.1.15

func (r Response) GetContentLength() string

func (Response) GetContentType added in v1.1.15

func (r Response) GetContentType() string

func (Response) GetDate added in v1.1.15

func (r Response) GetDate() string

func (Response) GetDateKst added in v1.2.5

func (r Response) GetDateKst() string

func (Response) GetEtag added in v1.1.15

func (r Response) GetEtag() string

func (Response) GetExpires added in v1.1.15

func (r Response) GetExpires() string

func (Response) GetHash added in v1.1.15

func (r Response) GetHash() string

func (Response) GetLastModified added in v1.1.15

func (r Response) GetLastModified() string

func (Response) GetServer added in v1.1.15

func (r Response) GetServer() string

func (Response) GetStatusCode added in v1.1.15

func (r Response) GetStatusCode() string

func (Response) GetVia added in v1.1.15

func (r Response) GetVia() string

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