unloader

package
v0.8.16 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

SPDX-License-Identifier: Apache-2.0 Copyright Authors of Tetragon

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 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

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

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