Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Location = "speedtest"
Functions ¶
This section is empty.
Types ¶
type Interface ¶
type Interface struct { InternalIP string `json:"internalIp"` Name string `json:"name"` MacAddress string `json:"macAddr"` IsVPN bool `json:"isVpn"` ExternalIP string `json:"externalIp"` }
Interface contains data about the interface used to run the speedtest
type Measure ¶
type Measure struct { Bandwidth int `json:"bandwidth"` Bytes int `json:"bytes"` Elapsed int `json:"elapsed"` }
Measure contains data for Download and Upload
func (*Measure) GetGigaBit ¶
GetGigaBit returns Measure speed in GigaBits
func (*Measure) GetMegaBit ¶
GetMegaBit returns Measure speed in MegaBits
func (*Measure) GetMegaByte ¶
GetMegaByte returns Measure speed in MegaBytes
type Result ¶
type Result struct { Type string `json:"type"` Timestamp string `json:"timestamp"` Ping Ping `json:"ping"` Download Measure `json:"download"` Upload Measure `json:"upload"` PacketLoss float64 `json:"packetLoss"` ISP string `json:"isp"` Interface Interface `json:"interface"` Server Server `json:"server"` Servers []Server `json:"servers"` Result SResult `json:"result"` }
Result contains data from CLI output
type Server ¶
type Server struct { ID int `json:"id"` Name string `json:"name"` Location string `json:"location"` Country string `json:"country"` Host string `json:"host"` Port int `json:"port"` IP string `json:"ip"` }
Server contains data about the server used to run the speedtest
func GetServers ¶
GetServers returns a list of servers recommended (bu Ookla) to run a Speedtest.
Click to show internal directories.
Click to hide internal directories.