loader

package
v0.0.14 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2022 License: Apache-2.0 Imports: 17 Imported by: 0

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

type WatchedMap

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

Jump to

Keyboard shortcuts

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