netanaly

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GlobalRttMap = make(map[string]map[string]Result)
View Source
var GlobalRttMutex = &sync.RWMutex{}
View Source
var GlobalRttResultMap = make(map[nettool.Tuple]RttStatistic)
View Source
var RttResultMapMutex = &sync.Mutex{}

Functions

func AddPing

func AddPing(ip4LaString string, ip4ReString string, pid uint32, rttMap map[string]map[string]Result)

func AnalysisIpv4

func AnalysisIpv4(s string) (string, error)

AnalysisIpv4 16进制的ipv4地址转为可识别的ipv4格式:例如“10.10.25.50:8888”

func AnalysisIpv6

func AnalysisIpv6(s string) (string, error)

func GetNeedPingsIp

func GetNeedPingsIp(pid uint32, selfNs netns.NsHandle, rttMap map[string]map[string]Result)

func GetNodeByIP

func GetNodeByIP(nodeIP string) (*cache.Node, bool)

func GetPodByIp

func GetPodByIp(podIp string) (*cache.Pod, bool)

func IPv4MappedToIPv6

func IPv4MappedToIPv6(ipv6Address string) (bool, string)

func UpdateNetConnectInfo added in v1.7.0

func UpdateNetConnectInfo(ctx context.Context)

Types

type Result

type Result struct {
	// 定义 Result 类型的字段
	ServiceIp string
	Latency   int
	Pid       map[uint32]struct{}
}

type RttStatistic

type RttStatistic struct {
	SumLatency float64
	Count      int
	Pids       []uint32
}

Jump to

Keyboard shortcuts

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