tc

package
v0.0.0-...-45a9bcf Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package tc holds tc related files

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ProgramKey

type ProgramKey struct {
	UID              string
	FuncName         string
	NetDevice        model.NetDevice
	NetworkDirection manager.TrafficType
}

ProgramKey is used to uniquely identify a tc program

func (*ProgramKey) Key

func (t *ProgramKey) Key() string

Key return an identifier

type Resolver

type Resolver struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

Resolver defines a TC resolver

func NewResolver

func NewResolver(config *config.Config) *Resolver

NewResolver returns a TC resolver

func (*Resolver) FlushInactiveProbes

func (tcr *Resolver) FlushInactiveProbes(m *manager.Manager, isLazy func(string) bool) map[uint32]int

FlushInactiveProbes detaches and deletes inactive probes. This function returns a map containing the count of interfaces per network namespace (ignoring the interfaces that are lazily deleted).

func (*Resolver) FlushNetworkNamespaceID

func (tcr *Resolver) FlushNetworkNamespaceID(namespaceID uint32, m *manager.Manager)

FlushNetworkNamespaceID flushes network ID

func (*Resolver) ResolveNetworkDeviceIfName

func (tcr *Resolver) ResolveNetworkDeviceIfName(ifIndex, netNS uint32) (string, bool)

ResolveNetworkDeviceIfName resolves network device name

func (*Resolver) SelectTCProbes

func (tcr *Resolver) SelectTCProbes() manager.ProbesSelector

SelectTCProbes selects TC probes

func (*Resolver) SendTCProgramsStats

func (tcr *Resolver) SendTCProgramsStats(statsdClient statsd.ClientInterface)

SendTCProgramsStats sends TC programs stats

func (*Resolver) SetupNewTCClassifierWithNetNSHandle

func (tcr *Resolver) SetupNewTCClassifierWithNetNSHandle(device model.NetDevice, netnsHandle *os.File, m *manager.Manager) error

SetupNewTCClassifierWithNetNSHandle creates and attaches TC probes on the provided device. WARNING: this function will not close the provided netns handle, so the caller of this function needs to take care of it.

Jump to

Keyboard shortcuts

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