btf

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2024 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExistKernelBTF

func ExistKernelBTF() (string, error)

func GetEBPFCollectionOptionsIfNeed

func GetEBPFCollectionOptionsIfNeed() *ebpf.CollectionOptions

Types

type EventQueue added in v0.6.0

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

func NewEventQueue added in v0.6.0

func NewEventQueue(partitionCount, sizePerPartition int, contextGenerator func() PartitionContext) *EventQueue

func (*EventQueue) PartitionContexts added in v0.6.0

func (e *EventQueue) PartitionContexts() []PartitionContext

func (*EventQueue) Push added in v0.6.0

func (e *EventQueue) Push(key string, data interface{})

func (*EventQueue) RegisterReceiver added in v0.6.0

func (e *EventQueue) RegisterReceiver(emap *ebpf.Map, perCPUBufferSize int, dataSupplier func() interface{},
	routeGenerator func(data interface{}) string)

func (*EventQueue) Start added in v0.6.0

func (e *EventQueue) Start(ctx context.Context, linker *Linker)

type LinkFunc added in v0.5.0

type LinkFunc func(symbol string, prog *ebpf.Program, opts *link.KprobeOptions) (link.Link, error)

type Linker added in v0.5.0

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

func NewLinker added in v0.5.0

func NewLinker() *Linker
func (m *Linker) AddLink(linkF LinkFunc, symbolWithPrograms map[string]*ebpf.Program)

func (*Linker) AddLinkOrError added in v0.5.0

func (m *Linker) AddLinkOrError(linkF LinkFunc, symbolWithPrograms map[string]*ebpf.Program) error

func (*Linker) AddSysCall added in v0.5.0

func (m *Linker) AddSysCall(call string, enter, exit *ebpf.Program)

func (*Linker) AddSysCallWithKProbe added in v0.5.0

func (m *Linker) AddSysCallWithKProbe(call string, linkK LinkFunc, p *ebpf.Program)

func (*Linker) AddTracePoint added in v0.5.0

func (m *Linker) AddTracePoint(sys, name string, p *ebpf.Program)

func (*Linker) Close added in v0.5.0

func (m *Linker) Close() error

func (*Linker) HasError added in v0.5.0

func (m *Linker) HasError() error

func (*Linker) OpenUProbeExeFile added in v0.5.0

func (m *Linker) OpenUProbeExeFile(path string) *UProbeExeFile

func (*Linker) ReadEventAsync added in v0.5.0

func (m *Linker) ReadEventAsync(emap *ebpf.Map, reader RingBufferReader, dataSupplier func() interface{})

func (*Linker) ReadEventAsyncWithBufferSize added in v0.5.0

func (m *Linker) ReadEventAsyncWithBufferSize(emap *ebpf.Map, reader RingBufferReader, perCPUBuffer int, dataSupplier func() interface{})

type PartitionContext added in v0.6.0

type PartitionContext interface {
	Start(ctx context.Context)
	Consume(data interface{})
}

type RingBufferReader added in v0.5.0

type RingBufferReader func(data interface{})

type UProbeExeFile added in v0.5.0

type UProbeExeFile struct {
	// contains filtered or unexported fields
}
func (u *UProbeExeFile) AddGoLink(symbol string, enter, exit *ebpf.Program, elfFile *elf.File)

func (*UProbeExeFile) AddGoLinkWithType added in v0.5.0

func (u *UProbeExeFile) AddGoLinkWithType(symbol string, enter bool, p *ebpf.Program, elfFile *elf.File)
func (u *UProbeExeFile) AddLink(symbol string, enter, exit *ebpf.Program)

func (*UProbeExeFile) AddLinkWithSymbols added in v0.5.0

func (u *UProbeExeFile) AddLinkWithSymbols(symbol []string, enter, exit *ebpf.Program)

func (*UProbeExeFile) AddLinkWithType added in v0.5.0

func (u *UProbeExeFile) AddLinkWithType(symbol string, enter bool, p *ebpf.Program)

Jump to

Keyboard shortcuts

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