structs

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2021 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Overview

Package structs defines the data structures for net.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DevInfo

type DevInfo struct {
	Timestamp int64    `json:"timestamp"`
	Device    []Device `json:"devices"`
}

DevInfo contains information about all current network devices.

type DevUsage

type DevUsage struct {
	Timestamp int64    `json:"timestamp"`
	TimeDelta int64    `json:"time_delta"`
	Device    []Device `json:"devices"`
}

DevUsage contains information about the usage of all current network devices. Usage is calculated as the delta between two /proc/net/dev snapshots; the TimeDelta field holds the time elapsed between the two snapshots used to calculate the usage.

type Device

type Device struct {
	Name        string `json:"name"`
	RBytes      int64  `json:"receive_bytes"`
	RPackets    int64  `json:"receive_packets"`
	RErrs       int64  `json:"receive_errs"`
	RDrop       int64  `json:"receive_drop"`
	RFIFO       int64  `json:"recieve_fifo"`
	RFrame      int64  `json:"receive_frame"`
	RCompressed int64  `json:"receive_compressed"`
	RMulticast  int64  `json:"receive_multicast"`
	TBytes      int64  `json:"transmit_bytes"`
	TPackets    int64  `json:"transmit_packets"`
	TErrs       int64  `json:"transmit_errs"`
	TDrop       int64  `json:"transmit_drop"`
	TFIFO       int64  `json:"transmit_fifo"`
	TColls      int64  `json:"transmit_colls"`
	TCarrier    int64  `json:"transmit_carrier"`
	TCompressed int64  `json:"transmit_compressed"`
}

Device contains information for a given network device.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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