ebpf

package
v0.0.62 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2026 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrCgroup2NotMounted = errors.New("cgroup2 not mounted")

Functions

func InitCgroupv2

func InitCgroupv2(log logr.Logger) error

func IsKernelBTFAvailable

func IsKernelBTFAvailable() bool

Types

type Config

type Config struct {
	QueueSize         int
	CustomBTFFilePath string
}

type DNSEvent

type DNSEvent struct {
	SrcIP     net.IP
	DstIP     net.IP
	Questions []layers.DNSQuestion
	Answers   []layers.DNSResourceRecord
}

func (DNSEvent) String

func (e DNSEvent) String() string

type NetworkTrafficKey added in v0.0.53

type NetworkTrafficKey struct {
	SrcIP    string
	DstIP    string
	SrcPort  uint16
	DstPort  uint16
	Protocol uint8
	Family   uint16
}

type Tracer

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

func NewTracer

func NewTracer(log logr.Logger, cfg Config) *Tracer

func (*Tracer) CollectNetworkSummary added in v0.0.53

func (t *Tracer) CollectNetworkSummary() (map[NetworkTrafficKey]TrafficSummary, error)

func (*Tracer) Events

func (t *Tracer) Events() <-chan DNSEvent

func (*Tracer) Run

func (t *Tracer) Run(ctx context.Context) error

type TrafficSummary added in v0.0.53

type TrafficSummary struct {
	RxPackets uint64
	RxBytes   uint64
	TxPackets uint64
	TxBytes   uint64
}

Jump to

Keyboard shortcuts

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