pin

package
v0.17.0 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2024 License: MIT Imports: 9 Imported by: 2 modules, 2 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WalkDir

func WalkDir(root string, bpffn WalkDirFunc) error

WalkDir walks the file tree rooted at path, calling bpffn for each node in the tree, including directories. Running WalkDir on a non-bpf filesystem is an error. Otherwise identical in behavior to fs.WalkDir.

See the WalkDirFunc for more information.

Types

type Pinner

type Pinner interface {
	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.

type WalkDirFunc

type WalkDirFunc func(path string, d fs.DirEntry, obj Pinner, err error) error

WalkDirFunc is the type of the function called for each object visited by WalkDir. It's identical to fs.WalkDirFunc, but with an extra Pinner argument. If the visited node is a directory, obj is nil.

err contains any errors encountered during bpffs traversal or object loading.

Jump to

Keyboard shortcuts

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