ping

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2022 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const PROTOCOL_SPEED = "speed"
View Source
const PROTOCOL_TRAFFIC = "traffic"

Variables

This section is empty.

Functions

func BatchTestLinks(links []string, max int, runFuncs []RunFunc) <-chan TestResult

func DownloadLinksSpeed added in v0.9.0

func DownloadLinksSpeed(links []string, max int) <-chan TestResult

func PingLinksLatency added in v0.9.0

func PingLinksLatency(links []string, max int, runPings []RunFunc) <-chan TestResult

func RenderDownloadLinksSpeed added in v0.9.0

func RenderDownloadLinksSpeed(links []string, max int, fontPath string, pngPath string, language string, urlGroup string, testInfoChan chan<- TestResult) error

func RenderDownloadLinksSpeedAndroid added in v0.9.0

func RenderDownloadLinksSpeedAndroid(links []string, max int, fontPath string, pngPath string, language string, urlGroup string) <-chan TestResult

Types

type PingResult

type PingResult struct {
	// contains filtered or unexported fields
}

func (PingResult) Get

func (pingResult PingResult) Get() (int64, error)

type RunFunc added in v0.9.0

type RunFunc func(int, string, chan<- TestResult) (bool, error)

type TCPPing

type TCPPing struct {
	// contains filtered or unexported fields
}

func NewTCPPing

func NewTCPPing(host string, port int) *TCPPing

func (TCPPing) Start

func (tcpping TCPPing) Start() <-chan PingResult

type TestResult added in v0.9.0

type TestResult struct {
	Result   int64
	Elapse   int64
	Server   string
	Port     int
	Index    int
	Err      error
	Protocol string
}

Jump to

Keyboard shortcuts

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