structs

package
v0.0.0-...-aaacee8 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CustomTransport

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

https://stackoverflow.com/questions/30526946/time-http-response-in-go https://stackoverflow.com/a/30547965 https://github.com/skyec/go-instrumented-roundtripper/blob/master/main.go go run file.go http://google.com

func NewTransport

func NewTransport(protocol string, proxy string) *CustomTransport

func (*CustomTransport) ConnDuration

func (tr *CustomTransport) ConnDuration() time.Duration

func (*CustomTransport) Duration

func (tr *CustomTransport) Duration() time.Duration

func (*CustomTransport) ReqDuration

func (tr *CustomTransport) ReqDuration() time.Duration

func (*CustomTransport) RoundTrip

func (tr *CustomTransport) RoundTrip(r *http.Request) (*http.Response, error)

type Proxy

type Proxy struct {
	IsOnline     bool
	Proxy        string        `json:"proxy"`
	Protocol     string        `json:"protocol"`
	AvgRespTime  time.Duration `json:"avgRespTime"`
	ConnDuration time.Duration `json:"connDuration"`
	Country      string        `json:"country"`
	IsoCode      string        `json:"isoCode"`
	ReqDuration  time.Duration `json:"reqDuration"`
}

Jump to

Keyboard shortcuts

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