Documentation
¶
Overview ¶
Package httpc sends requests built from core domain types and captures per-phase timings via httptrace. It has no TUI dependencies.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Event ¶ added in v0.4.0
Event is one httptrace point: when it happened relative to the request start, and how long the phase it closes took (zero for instants).
type Response ¶
type Response struct {
Status string
StatusCode int
Proto string
Headers http.Header
Body []byte
// Truncated is set when the body exceeded the in-memory cap.
Truncated bool
Timings Timings
}
type Timings ¶
type Timings struct {
DNS time.Duration
Connect time.Duration
TLS time.Duration
// TTFB is measured from the start of the round trip to the first
// response byte.
TTFB time.Duration
Total time.Duration
// Events are the trace points in order, each offset from the start of
// the round trip, so a caller can draw a waterfall rather than a set of
// bars that all begin at zero.
Events []Event
}
Timings leaves phases that did not happen (e.g. reused connection, plain HTTP) at zero.
Click to show internal directories.
Click to hide internal directories.