net

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2019 License: MIT Imports: 4 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Context

type Context struct {
	Procfs string
}
var Ctx Context

type NetInfo

type NetInfo struct {
	NicNum int       // 网卡数量
	Nics   []NicInfo // 每个网卡的状态信息
}

func GetNetInfo

func GetNetInfo() NetInfo

type NicInfo

type NicInfo struct {
	Name string

	RBytes       int
	RPackets     int
	RErrs        int
	RDrop        int
	RFifo        int
	RFrame       int
	RComporessed int
	RMulticast   int

	TBytes       int
	TPackets     int
	TErrs        int
	TDrop        int
	TFifo        int
	TFrame       int
	TComporessed int
	TMulticast   int
}

Jump to

Keyboard shortcuts

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