Documentation ¶
Index ¶
Constants ¶
View Source
const ( HTTPStepDNSLookup = "DNS_LOOKUP" HTTPStepConnect = "CONNECT" HTTPStepTLSHandshake = "TLS_HANDSHAKE" HTTPStepWriteRequest = "WRITE_REQUEST" )
View Source
const ( KindTCP = "TCP" KindHTTP = "HTTP" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HTTPClientTrace ¶ added in v0.3.5
type HTTPClientTrace struct {
// contains filtered or unexported fields
}
func (*HTTPClientTrace) CreateContext ¶ added in v0.3.5
func (t *HTTPClientTrace) CreateContext(ctx context.Context) context.Context
func (*HTTPClientTrace) SetEndTime ¶ added in v0.3.6
func (t *HTTPClientTrace) SetEndTime(when time.Time)
func (*HTTPClientTrace) TraceInfo ¶ added in v0.3.5
func (t *HTTPClientTrace) TraceInfo() HTTPTraceInfo
type HTTPProber ¶
type HTTPProber struct { }
func NewHTTPProber ¶
func NewHTTPProber() *HTTPProber
func (*HTTPProber) Kind ¶
func (p *HTTPProber) Kind() string
type HTTPResult ¶
type HTTPResult struct { Target Error error DNSResolveTime time.Duration ConnectTime time.Duration TLSHandshakeTime time.Duration TTFB time.Duration TransferTime time.Duration TotalTime time.Duration ResponseStatusCode int ResponseSize int ResponseBody []byte }
func (HTTPResult) RTT ¶
func (r HTTPResult) RTT() time.Duration
func (HTTPResult) String ¶
func (r HTTPResult) String() string
type HTTPTraceInfo ¶ added in v0.3.5
type HTTPTraceInfo struct { // FailedStep is the step name that failed while requesting. FailedStep string // DNSLookup is a duration that transport took to perform // DNS lookup. DNSLookup time.Duration // ConnTime is a duration that took to obtain a successful connection. ConnTime time.Duration // TCPConnTime is a duration that took to obtain the TCP connection. TCPConnTime time.Duration // TLSHandshake is a duration that TLS handshake took place. TLSHandshake time.Duration // RequestSendingTime is a duration that request wrote takes(may contains multiple retries). RequestSendingTime time.Duration // TTFB(TimeToFirstByte) is a duration that server took to respond first byte. TTFB time.Duration // ResponseTime is a duration since first response byte from server to // request completion. ResponseTime time.Duration // TotalTime is a duration that total request took end-to-end. TotalTime time.Duration // IsConnReused is whether this connection has been previously // used for another HTTP request. IsConnReused bool // IsConnWasIdle is whether this connection was obtained from an // idle pool. IsConnWasIdle bool // ConnIdleTime is a duration how long the connection was previously // idle, if IsConnWasIdle is true. ConnIdleTime time.Duration // RemoteAddr returns the remote network address. RemoteAddr net.Addr // Timestamps RequestStartAt time.Time FirstResponseByteAt time.Time }
type ICMPProber ¶
type ICMPProber struct {
// contains filtered or unexported fields
}
func NewICMPProber ¶
func NewICMPProber(privileged bool) *ICMPProber
func (*ICMPProber) Kind ¶
func (p *ICMPProber) Kind() string
type ICMPResult ¶
type ICMPResult struct { Target Stats *ping.Statistics }
func (ICMPResult) RTT ¶
func (r ICMPResult) RTT() time.Duration
func (ICMPResult) String ¶
func (r ICMPResult) String() string
Click to show internal directories.
Click to hide internal directories.