ebpf

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2022 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FlowTracer

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

FlowTracer reads and forwards the Flows from the Transmission Control, for a given interface.

func NewFlowTracer

func NewFlowTracer(
	sampling, cacheMaxSize, buffersLength int,
	evictionTimeout time.Duration,
	namer flow.InterfaceNamer,
) (*FlowTracer, error)

TODO: decouple flowtracer logic from eBPF maps access so we can inject mocks for testing

func (*FlowTracer) Register

func (m *FlowTracer) Register(iface ifaces.Interface) error

Register and links the eBPF tracer into the system. The program should invoke Unregister before exiting.

func (*FlowTracer) Trace

func (m *FlowTracer) Trace(ctx context.Context, forwardFlows chan<- []*flow.Record)

Trace and forward the read flows until the passed context is Done

Jump to

Keyboard shortcuts

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