loader

package
v0.0.15 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2024 License: Apache-2.0 Imports: 17 Imported by: ? modules, 0 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 NewNoopWatcher added in v0.0.11

func NewNoopWatcher() *noopWatcher

Types

type KvPair

type KvPair struct {
	Key   map[string]string
	Value string
	Hash  uint64
}

type LoadOptions

type LoadOptions struct {
	ParsedELF *ParsedELF
	Watcher   MapWatcher
	PinMaps   string
	PinProgs  string
}

type Loader

type Loader interface {
	Parse(ctx context.Context, reader io.ReaderAt) (*ParsedELF, error)
	Load(ctx context.Context, opts *LoadOptions) error
	WatchMaps(ctx context.Context, watchedMaps map[string]WatchedMap, watchedMapOptions map[string]WatchedMapOptions, coll map[string]*ebpf.Map, watcher MapWatcher) error
}

func NewLoader

func NewLoader(
	decoderFactory decoder.DecoderFactory,
	metricsProvider stats.MetricsProvider,
) Loader

type MapEntry

type MapEntry struct {
	Name  string
	Entry KvPair
}

type MapWatcher

type MapWatcher interface {
	NewRingBuf(name string, keys []string)
	NewHashMap(name string, keys []string)
	SendEntry(entry MapEntry)
	Close()
}

type ParsedELF

type ParsedELF struct {
	Spec              *ebpf.CollectionSpec
	WatchedMaps       map[string]WatchedMap
	WatchedMapOptions map[string]WatchedMapOptions
}

type WatchedMap

type WatchedMap struct {
	Name   string
	Labels []string
	// contains filtered or unexported fields
}

type WatchedMapOptions added in v0.0.15

type WatchedMapOptions struct {
	HistValueKey string
	HistBuckets  []float64
}

Jump to

Keyboard shortcuts

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