speedtest

package
v0.0.0-...-582c6c4 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Speedtest

type Speedtest struct {
	TestStartTime time.Time        // When did the test start?
	TestDuration  time.Duration    // How long did the test take?
	Result        *SpeedtestResult // Results from interacting with the remote server
}

func (*Speedtest) RunTest

func (g *Speedtest) RunTest() error

RunTest will run the test and return an error should one occur.

type SpeedtestResult

type SpeedtestResult struct {
	UploadMbps    float64       // Upload bandwidth in Mbps
	DownloadMbps  float64       // Download bandwidth in Mbps
	PingLatencyMs time.Duration // Ping to test server in ms
}

SpeedtestResult encapsulates the results strictly required for the speedtest. Duration is omitted here since it's not strictly needed (see parent object)

Jump to

Keyboard shortcuts

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