unloader

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChainUnloader

type ChainUnloader []Unloader

chainUnloader is an unloader for multiple resources. Useful when a loading operation needs to be unwinded due to an error.

func (ChainUnloader) Unload

func (cu ChainUnloader) Unload() error

type LinkUnloader

type LinkUnloader struct {
	Link link.Link
}

PinUnloader unpins and closes a BPF program.

func (LinkUnloader) Unload

func (lu LinkUnloader) Unload() error

type MultiRelinkUnloader added in v1.1.0

type MultiRelinkUnloader struct {
	// UnloadProg unloads the program
	UnloadProg func() error
	// IsLinked is true iff the program is linked
	IsLinked bool
	// Link is the link object (valid iff IsLinked)
	Links []link.Link
	// Function to relink (requires calling Unlink first)
	RelinkFn func() ([]link.Link, error)
}

MultiRelinkUnloader is an unloader for multiple links that allows unlinking/relinking as well.

func (u *MultiRelinkUnloader) Relink() error
func (u *MultiRelinkUnloader) Unlink() error

func (*MultiRelinkUnloader) Unload added in v1.1.0

func (u *MultiRelinkUnloader) Unload() error

type PinUnloader

type PinUnloader struct {
	Prog *ebpf.Program
}

PinUnloader unpins and closes a BPF program.

func (PinUnloader) Unload

func (pu PinUnloader) Unload() error

type RawDetachUnloader

type RawDetachUnloader struct {
	TargetFD   int
	Name       string
	Prog       *ebpf.Program
	AttachType ebpf.AttachType
}

rawDetachUnloader can be used to unload cgroup and sockmap programs.

func (*RawDetachUnloader) Unload

func (rdu *RawDetachUnloader) Unload() error

type RelinkUnloader added in v0.8.3

type RelinkUnloader struct {
	// UnloadProg unloads the program
	UnloadProg func() error
	// IsLinked is true iff the program is linked
	IsLinked bool
	// Link is the link object (valid iff IsLinked)
	Link link.Link
	// Function to relink (requires calling Unlink first)
	RelinkFn func() (link.Link, error)
}

RelinkUnloader is an unloader that allows unlinking/relinking as well.

func (u *RelinkUnloader) Relink() error
func (u *RelinkUnloader) Unlink() error

func (*RelinkUnloader) Unload added in v0.8.3

func (u *RelinkUnloader) Unload() error

type TcAttachment

type TcAttachment struct {
	LinkName  string
	IsIngress bool
}

type TcUnloader

type TcUnloader struct {
	Attachments []TcAttachment
}

TcUnloader unloads programs attached to TC filters

func (TcUnloader) Unload

func (tu TcUnloader) Unload() error

type Unloader

type Unloader interface {
	Unload() error
}

Unloader describes how to unload a sensor resource, e.g. programs or maps.

Jump to

Keyboard shortcuts

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