tracer

package
v0.0.0-...-6b06518 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2020 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SO_ATTACH_BPF = 50
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CidrStats

type CidrStats struct {
	BytesRecv   uint64 `json:"bytesRecv"`
	BytesSent   uint64 `json:"bytesSent"`
	PacketsRecv uint64 `json:"packetsRecv"`
	PacketsSent uint64 `json:"packetsSent"`
}

type NetCost

type NetCost struct {
	Timestamp string                `json:"timestamp"`
	Networks  map[string]*CidrStats `json:"networks"`
}

type Tracer

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

func NewTracer

func NewTracer(netList []net.IPNet) (*Tracer, error)

func (*Tracer) GetIfaceStats

func (t *Tracer) GetIfaceStats(name string) (*NetCost, error)

func (*Tracer) RegisterIface

func (t *Tracer) RegisterIface(name string, ifindex int, netns string) (err error)

func (*Tracer) UnregisterIface

func (t *Tracer) UnregisterIface(name string) error

Jump to

Keyboard shortcuts

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