Help us shape the future of Go! Take the 2026 Go Developer Survey

probe

package
v0.0.164 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2026 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package probe dials an outbound and completes one HTTP request through it, timed.

Index

Constants

This section is empty.

Variables

View Source
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.

Jump to

Keyboard shortcuts

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