ookla

package
v0.0.0-...-091f842 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 15, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

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

func GenerateHints(hint string, len int) []string

generate all combination of a-z with length len

func ImportOoklaServerfromFile

func ImportOoklaServerfromFile(cfg *common.Config, filename string) []spdb.SpeedServer

func LoadOokla

func LoadOokla(cfg *common.Config) []spdb.SpeedServer

func QueryServers

func QueryServers(hints string, results chan ResultsCarrier, wchan chan int)

func ResolveIP

func ResolveIP(serveridx int, iph iputils.IPHandler, 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
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL