Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateErrorSummary ¶
Types ¶
type ServerList ¶
type ServerList struct {
Type string `json:"type"`
Timestamp time.Time `json:"timestamp"`
Servers []Server `json:"servers"`
}
func ListServers ¶
func ListServers() (*ServerList, error)
type SpeedResult ¶
type SpeedResult struct {
Bandwidth int `json:"bandwidth"`
Bytes int `json:"bytes"`
Elapsed int `json:"elapsed"`
}
func (*SpeedResult) BandwidthInMbps ¶
func (s *SpeedResult) BandwidthInMbps() float64
type SpeedtestResult ¶
type SpeedtestResult struct {
Type string `json:"type"`
Timestamp time.Time `json:"timestamp"`
Ping Ping `json:"ping"`
Download SpeedResult `json:"download"`
Upload SpeedResult `json:"upload"`
PacketLoss float64 `json:"packetLoss"`
Isp string `json:"isp"`
Interface Interface `json:"interface"`
Server Server `json:"server"`
Result Result `json:"result"`
}
func Test ¶
func Test() (*SpeedtestResult, error)
func TestForServer ¶
func TestForServer(s Server) (*SpeedtestResult, error)
func (*SpeedtestResult) CreateSummary ¶
func (s *SpeedtestResult) CreateSummary() map[string]interface{}
func (*SpeedtestResult) DownloadInMbps ¶
func (s *SpeedtestResult) DownloadInMbps() float64
func (*SpeedtestResult) ToString ¶
func (r *SpeedtestResult) ToString() string
func (*SpeedtestResult) UploadInMbps ¶
func (s *SpeedtestResult) UploadInMbps() float64
Click to show internal directories.
Click to hide internal directories.