Documentation ¶
Index ¶
- func AppendIfMissing(slice []string, i string) []string
- func CompareList(a, b []string) []string
- func DestAddrs(ctx context.Context, host string, resolver *net.Resolver, ...) ([]string, error)
- func HasListDuplicates(m []string) (string, error)
- func HasMapDuplicates(m map[string]string) bool
- func IsEqualIP(ips1, ips2 string) bool
- func SrvRecordCheck(record string) bool
- func SrvRecordHosts(record string) ([]string, error)
- func Time2Float(t time.Duration) float32
- func TimeAverage(values []time.Duration) float64
- func TimeCorrectedDeviation(values []time.Duration) float64
- func TimeRange(values []time.Duration) time.Duration
- func TimeSquaredDeviation(values []time.Duration) float64
- func TimeUncorrectedDeviation(values []time.Duration) float64
- type IcmpHop
- type IcmpID
- type IcmpReturn
- type IcmpSummary
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppendIfMissing ¶
AppendIfMissing Append only if the item does not exists in the current list
func CompareList ¶
CompareList Compare two lists and return a list with the difference
func DestAddrs ¶
func DestAddrs(ctx context.Context, host string, resolver *net.Resolver, timeout time.Duration) ([]string, error)
DestAddrs resolve the hostname to all it'ss IP's
func HasListDuplicates ¶
HasListDuplicates Find duplicates in a list
func HasMapDuplicates ¶
HasMapDuplicates Find duplicates in a map keys
func SrvRecordCheck ¶
func SrvRecordHosts ¶
func TimeAverage ¶
TimeAverage Calculates the average of a slice of durations
func TimeCorrectedDeviation ¶
TimeCorrectedDeviation Calculates standard deviation using Bessel's correction which uses n-1 in the SD formula to correct bias of small sample size
func TimeSquaredDeviation ¶
TimeSquaredDeviation Calculates the squared deviation
func TimeUncorrectedDeviation ¶
TimeUncorrectedDeviation Calculates standard deviation without correction
Types ¶
type IcmpHop ¶
type IcmpHop struct { Success bool `json:"success"` AddressFrom string `json:"address_from"` AddressTo string `json:"address_to"` N int `json:"n"` TTL int `json:"ttl"` Snt int `json:"snt"` SntFail int `json:"snt_fail"` LastTime time.Duration `json:"last"` SumTime time.Duration `json:"sum"` AvgTime time.Duration `json:"avg"` BestTime time.Duration `json:"best"` WorstTime time.Duration `json:"worst"` SquaredDeviationTime time.Duration `json:"sd"` UncorrectedSDTime time.Duration `json:"usd"` CorrectedSDTime time.Duration `json:"csd"` RangeTime time.Duration `json:"range"` Loss float64 `json:"loss"` }
IcmpHop ICMP HOP Response time details
type IcmpID ¶
type IcmpID struct {
// contains filtered or unexported fields
}
IcmpID ICMP Echo Unique ID for each coroutine
type IcmpReturn ¶
IcmpReturn ICMP Response time details