latency

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2024 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Destination

type Destination struct {
	Ip          string
	CountryCode string
}

type Latency

type Latency struct {
	MeanMs     float64
	MedianMs   float64
	P90Ms      float64
	PacketLoss float64
}

type Result

type Result struct {
	Ip            string
	CountryCode   string
	AlternativeIP string
	ErrorMessage  string
	Successful    bool
	Latency       Latency
}

func GetLatency

func GetLatency(destination Destination) (result Result, err error)

func (*Result) GenerateCsv

func (r *Result) GenerateCsv(includeHeader bool) (result string)

func (*Result) GenerateText

func (r *Result) GenerateText() string

Jump to

Keyboard shortcuts

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