Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetClientInfo ¶
func GetClientInfo() (*clientSpeedtestConfig, error)
通过httpget访问clientConfigUrl得到客户端信息
func GetServerLists ¶
func GetServerLists() (*serverSettings, error)
通过httpget访问serversConfigUrl得到服务器列表信息
func HumanSpeed ¶
Types ¶
type Testserver ¶
type Testserver struct { Name string Sponsor string Country string Lat float64 Long float64 Distance float64 //距离服务器的距离单位KM URLs []string Host string Latency time.Duration //latency in ms }
func (*Testserver) Downstream ¶
func (ts *Testserver) Downstream(duration int) (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.