Documentation ¶
Index ¶
- func DoParallelPings(config config.Config, queue chan<- *RequestInfo)
- type RequestInfo
- func (t *RequestInfo) ConnectDone()
- func (t *RequestInfo) DNSDone()
- func (t *RequestInfo) DNSStart()
- func (t *RequestInfo) GotFirstResponseByte()
- func (t *RequestInfo) IsOk() bool
- func (t *RequestInfo) Lock()
- func (t *RequestInfo) RequestDone(statusCode int)
- func (t *RequestInfo) RequestStart(name, uri string)
- func (t *RequestInfo) Unlock()
- func (t *RequestInfo) WroteRequest()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DoParallelPings ¶
func DoParallelPings(config config.Config, queue chan<- *RequestInfo)
DoParallelPings calls ping on the given URIs and pushes the result in the given queue
Types ¶
type RequestInfo ¶
type RequestInfo struct { Name string URI string StatusCode int Error error Resolving time.Duration Connecting time.Duration Sending time.Duration Waiting time.Duration Receiving time.Duration Total time.Duration BodySize int // contains filtered or unexported fields }
RequestInfo contains the different timings involved in sending an HTTP request and its response
func (*RequestInfo) ConnectDone ¶
func (t *RequestInfo) ConnectDone()
ConnectDone sets the connection time
func (*RequestInfo) DNSStart ¶
func (t *RequestInfo) DNSStart()
DNSStart starts the resolution timer
func (*RequestInfo) GotFirstResponseByte ¶
func (t *RequestInfo) GotFirstResponseByte()
GotFirstResponseByte sets the waiting time
func (*RequestInfo) IsOk ¶ added in v1.4.0
func (t *RequestInfo) IsOk() bool
IsOk returns true if the request succeeded
func (*RequestInfo) Lock ¶ added in v1.4.0
func (t *RequestInfo) Lock()
Lock locks the RequestInfo mutex
func (*RequestInfo) RequestDone ¶
func (t *RequestInfo) RequestDone(statusCode int)
RequestDone sets the receiving time
func (*RequestInfo) RequestStart ¶
func (t *RequestInfo) RequestStart(name, uri string)
RequestStart starts the timer
func (*RequestInfo) Unlock ¶ added in v1.4.0
func (t *RequestInfo) Unlock()
Unlock unlocks the RequestInfo mutex
func (*RequestInfo) WroteRequest ¶
func (t *RequestInfo) WroteRequest()
WroteRequest sets the writing time
Click to show internal directories.
Click to hide internal directories.