probe

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ProbeFunc

type ProbeFunc func(ctx context.Context, client *http.Client) Result

ProbeFunc defines the signature for a network diagnostic probe.

func DefaultProbes

func DefaultProbes() []ProbeFunc

DefaultProbes returns the standard slice of probes (YouTube CDN & Netflix).

type Result

type Result struct {
	Name      string `json:"name"`
	Passed    bool   `json:"passed"`
	LatencyMs int64  `json:"latency_ms"`
	IATACode  string `json:"iata_code,omitempty"`
	Region    string `json:"region,omitempty"`
	Country   string `json:"country,omitempty"`
	Error     string `json:"error,omitempty"`
}

Result contains the diagnostic result from a network probe.

func Netflix

func Netflix(ctx context.Context, client *http.Client) Result

Netflix probes Netflix service availability and license country unlocking.

func Run

func Run(ctx context.Context, client *http.Client, probes ...ProbeFunc) []Result

Run executes a series of probes concurrently using the provided HTTP client.

func YouTubeCDN

func YouTubeCDN(ctx context.Context, client *http.Client) Result

YouTubeCDN probes Google Video redirector to determine edge server IATA code, city, and latency.

Jump to

Keyboard shortcuts

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