pin

package
v0.20.0 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2025 License: MIT Imports: 11 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WalkDir

func WalkDir(root string, opts *ebpf.LoadPinOptions) iter.Seq2[*Pin, error]

WalkDir walks the file tree rooted at path and yields a Pin for each BPF object below the path.

Callers must invoke Pin.Take if they wish to hold on to the object.

Types

type Pin added in v0.19.0

type Pin struct {
	Path   string
	Object io.Closer
}

Pin represents an object and its pinned path.

func (*Pin) Take added in v0.19.0

func (p *Pin) Take()

Take ownership of Pin.Object.

The caller is responsible for calling close on [Pin.Object].

type Pinner

type Pinner interface {
	io.Closer
	Pin(string) error
}

Pinner is an interface implemented by all eBPF objects that support pinning to a bpf virtual filesystem.

func Load

func Load(path string, opts *ebpf.LoadPinOptions) (Pinner, error)

Load retrieves a pinned object from a bpf virtual filesystem. It returns one of ebpf.Map, ebpf.Program, or link.Link.

Trying to open anything other than a bpf object is an error.

Jump to

Keyboard shortcuts

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