Documentation
¶
Index ¶
Constants ¶
View Source
const ( KB = 1024 * bits MB = 1024 * KB GB = 1024 * MB TB = 1024 * GB PB = 1024 * TB )
Variables ¶
View Source
var (
ErrTimeout = errors.New("Timeout")
)
Functions ¶
func GetServerList ¶
func GetServerList() ([]server, error)
GetServerList returns a list of servers in the native speedtest.net structure
func HumanSpeed ¶
Types ¶
type Config ¶
type Testserver ¶
type Testserver struct {
Name string
Sponsor string
Country string
Lat float64
Long float64
Distance float64 //distance from server in KM
URLs []string
Host string
Latency time.Duration //latency in ms
}
func (*Testserver) Downstream ¶
func (ts *Testserver) Downstream(duration int, interface_id string) (uint64, error)
Downstream measures upstream bandwidth in bps
func (*Testserver) MedianPing ¶
func (ts *Testserver) MedianPing(count int) (time.Duration, error)
MedianPing runs a latency test against the server and stores the median latency
Click to show internal directories.
Click to hide internal directories.