tracer

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Result

type Result struct {
	URL              string
	DNSLookup        time.Duration
	TCPConnection    time.Duration
	ServerProcessing time.Duration
	ContentTransfer  time.Duration
	Total            time.Duration
}

func (*Result) String

func (r *Result) String() string

type Tracer

type Tracer struct {
	URL                      string
	Created                  time.Time
	RequestStart             time.Time
	DNSStartTime             time.Time
	DNSDoneTime              time.Time
	GotConnTime              time.Time
	GotFirstResponseByteTime time.Time
	BodyReadTime             time.Time
	Response                 *http.Response
}

func Do

func Do(ctx context.Context, client *http.Client, req *http.Request) (*Tracer, error)

func (*Tracer) ConnectStart

func (t *Tracer) ConnectStart(_, _ string)

func (*Tracer) DNSDone

func (t *Tracer) DNSDone(_ httptrace.DNSDoneInfo)

func (*Tracer) DNSStart

func (t *Tracer) DNSStart(_ httptrace.DNSStartInfo)

func (*Tracer) GetResult

func (t *Tracer) GetResult() *Result

func (*Tracer) GotConn

func (t *Tracer) GotConn(info httptrace.GotConnInfo)

func (*Tracer) GotFirstResponseByte

func (t *Tracer) GotFirstResponseByte()

Jump to

Keyboard shortcuts

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