netreler

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AnalyzedResult

type AnalyzedResult struct {
	Result       *PingResult
	ScoreRtt     int
	ScorePackets float64
}

type AnalyzedResults

type AnalyzedResults map[string][]AnalyzedResult

func (AnalyzedResults) Analyze

func (ar AnalyzedResults) Analyze() float64

type PingResult

type PingResult struct {
	Stats   *ping.Statistics
	Packets []ping.Packet
}

func SinglePingTest

func SinglePingTest(host string, c chan os.Signal) (*PingResult, error)

func (*PingResult) Analyze

func (pr *PingResult) Analyze() AnalyzedResult

type TestResult

type TestResult struct {
	TestedHosts []string
	Score       float64
	Meta        AnalyzedResults
	Spent       time.Duration
}

func Test

func Test(c chan os.Signal) *TestResult

func (*TestResult) JSON

func (t *TestResult) JSON() ([]byte, error)

func (*TestResult) PrettyPrintMeta

func (t *TestResult) PrettyPrintMeta() ([]byte, error)

Jump to

Keyboard shortcuts

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