package pin
import "github.com/cilium/ebpf/pin"
Index ¶
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 ¶
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 ¶
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.
Source Files ¶
- Version
- v0.17.1
- Published
- Dec 20, 2024
- Platform
- windows/amd64
- Imports
- 9 packages
- Last checked
- 14 minutes ago –
Tools for package owners.