Documentation
¶
Index ¶
- Constants
- func ConvOoklatoDB(oservers []OoklaServer, cfg *common.Config) []spdb.SpeedServer
- func GenerateHints(hint string, len int) []string
- func ImportOoklaServerfromFile(cfg *common.Config, filename string) []spdb.SpeedServer
- func LoadOokla(cfg *common.Config) []spdb.SpeedServer
- func QueryServers(hints string, results chan ResultsCarrier, wchan chan int)
- func ResolveIP(serveridx int, iph iputils.IPHandler, wchan chan int)
- func ResultCollector(rchan chan ResultsCarrier)
- type OoklaServer
- type ResultsCarrier
Constants ¶
View Source
const MaxRecord = 100
View Source
const OoklaQuery = "https://www.speedtest.net/api/js/servers?engine=js&search=%s&https_functional=true&limit=1000"
Variables ¶
This section is empty.
Functions ¶
func ConvOoklatoDB ¶
func ConvOoklatoDB(oservers []OoklaServer, cfg *common.Config) []spdb.SpeedServer
func GenerateHints ¶
generate all combination of a-z with length len
func ImportOoklaServerfromFile ¶
func ImportOoklaServerfromFile(cfg *common.Config, filename string) []spdb.SpeedServer
func QueryServers ¶
func QueryServers(hints string, results chan ResultsCarrier, wchan chan int)
func ResultCollector ¶
func ResultCollector(rchan chan ResultsCarrier)
Types ¶
type OoklaServer ¶
type OoklaServer struct {
Url string `json:"url"`
Lat string `json:"lat"`
Lon string `json:"lon"`
Name string `json:"name"`
Country string `json:"country"`
CountryCode string `json:"cc"`
Sponsor string `json:"sponsor"`
Id string `json:"id"`
Https int `json:"https_functional"`
Host string `json:"host"`
IPv4 string `json:"ipv4"`
ASN string `json:"asn"`
}
type ResultsCarrier ¶
type ResultsCarrier struct {
Hint string
Servers []OoklaServer
}
Click to show internal directories.
Click to hide internal directories.