pinger

package
v0.0.0-...-406c194 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PingAsTables

func PingAsTables(host string, count int, dnsservers []string, logfunc func(string)) string

func Tcping

func Tcping(tcpingArg TcpingArg) (result *tping.Result, err error)

Tcping 使用tcping框架ping tcp/http/https地址

Types

type PingArgs

type PingArgs struct {
	DstAddr string   // 目的地址
	Port    int      // 端口
	Args    []string // 其他参数
	Id      int64    // Ag节点和App应用站点唯一标识,来自acs服务
}

type PingResult

type PingResult struct {
	PingArgs   // 请求参数
	RemoteAddr string
	Count      int     // 总数
	Success    int     // 成功数量
	Fail       int     // 失败数量
	MinRtt     float64 // 最小延时
	MaxRtt     float64 // 最大延时
	AvgRtt     float64 // 平均延时
	PacketLoss int     // 丢包率
}

func PingWithGoPing

func PingWithGoPing(pingArgs PingArgs) (result PingResult, err error)

PingWithGoPing ICMP实现,主要用于AG节点的ping检测

type TcpingArg

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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