Documentation
¶
Overview ¶
Package probe dials an outbound and completes one HTTP request through it, timed.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrUnusableInput = errors.New("unusable probe input")
ErrUnusableInput wraps a failure caused by Run's own arguments: an unusable probeURL, or a non-positive timeout. It means the arguments cannot produce a probe, not that the outbound or the target failed.
Functions ¶
func Run ¶
func Run(ctx context.Context, out A.Outbound, probeURL string, timeout time.Duration) (time.Duration, error)
Run dials out, completes an HTTP GET to probeURL over that one connection, discarding the body, and reports how long it took. A request that completes is a success whatever status it returned; when probeURL's handler confirms receipt, success also means the handler was reached. The connection is closed before Run returns.
The reported duration spans the handshake and the request, plus the dial for an outbound that does not defer its handshake to first use.
Types ¶
This section is empty.