Versions in this module Expand all Collapse all v1 v1.0.3 Oct 26, 2016 Changes in this version + type ByDistance []Server + func (server ByDistance) Len() int + func (server ByDistance) Less(i, j int) bool + func (server ByDistance) Swap(i, j int) + type ByLatency []Server + func (server ByLatency) Len() int + func (server ByLatency) Less(i, j int) bool + func (server ByLatency) Swap(i, j int) + type Client struct + Config *Config + Debug bool + HTTPConfig *HTTPConfig + ReportChar string + SpeedtestConfig *SpeedtestConfig + func NewClient(speedtestConfig *SpeedtestConfig, httpConfig *HTTPConfig, debug bool, ...) *Client + func (stClient *Client) DownloadSpeed(url string) (speed float64, err error) + func (stClient *Client) GetClosestServers(servers []Server) []Server + func (stClient *Client) GetConfig() (c Config, err error) + func (stClient *Client) GetFastestServer(servers []Server) Server + func (stClient *Client) GetLatency(server Server, url string) (result float64, err error) + func (stClient *Client) GetLatencyURL(server Server) string + func (stClient *Client) GetServers() (servers []Server, err error) + func (stClient *Client) UploadSpeed(url string, mimetype string, data []byte) (speed float64, err error) + type Config struct + IP string + Isp string + Lat float64 + Lon float64 + type HTTPConfig struct + HTTPTimeout time.Duration + type Server struct + CC string + Country string + Distance float64 + ID string + Lat float64 + Latency float64 + Lon float64 + Name string + Sponsor string + URL string + type SpeedtestConfig struct + AlgoType string + Blacklist []string + ConfigURL string + Interface string + NumClosest int + NumLatencyTests int + ServersURL string + UserAgent string