Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Measurement ¶
Measurement contains the result of network speed measurement
func MeasureWithFast ¶
func MeasureWithFast() (Measurement, error)
MeasureWithFast naively attempts to measure network speed by using fast.com's api directly because fast-cli and go-fast libraries provide only download speed
func MeasureWithFastInHeadlessBrowser ¶
func MeasureWithFastInHeadlessBrowser() (Measurement, error)
MeasureWithFastInHeadlessBrowser measures network speed by opening fast.com in a headless chrome browser and scraping the page
func MeasureWithSpeedtest ¶
func MeasureWithSpeedtest() (Measurement, error)
MeasureWithSpeedtest measures network speed using speedtest.com's api
func (Measurement) String ¶
func (measurement Measurement) String() string
type Measurer ¶
type Measurer interface {
Measure() (Measurement, error)
}
Measurer is the common interface for all the measurement functions
type MeasurerFunc ¶
type MeasurerFunc func() (Measurement, error)
MeasurerFunc is used to create a Measurer from a function with the proper signature
func (MeasurerFunc) Measure ¶
func (f MeasurerFunc) Measure() (Measurement, error)
Measure is MeasurerFunc implementation of Measurer
Click to show internal directories.
Click to hide internal directories.