bpfrecorder

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2023 License: Apache-2.0 Imports: 39 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotFound = errors.New("no recorded profile found")

ErrNotFound is the GRPC error if no recorded profile found.

Functions

func Dial

Dial can be used to connect to the default GRPC server by creating a new client.

Types

type BpfRecorder

type BpfRecorder struct {
	api.UnimplementedBpfRecorderServer
	// contains filtered or unexported fields
}

BpfRecorder is the main structure of this package.

func New

func New(logger logr.Logger) *BpfRecorder

New returns a new BpfRecorder instance.

func (*BpfRecorder) FilterProgramName added in v0.7.0

func (b *BpfRecorder) FilterProgramName(filter string)

FilterProgramName can be used to filter on a specific program name.

func (*BpfRecorder) FindProcMountNamespace added in v0.7.0

func (b *BpfRecorder) FindProcMountNamespace(pid uint32) (uint32, error)

FindProcMountNamespace is looking up the mnt ns for a given PID.

func (*BpfRecorder) Load added in v0.7.0

func (b *BpfRecorder) Load(startEventProcessor bool) (err error)

Load prestarts the bpf recorder.

func (*BpfRecorder) Run

func (b *BpfRecorder) Run() error

Run the BpfRecorder.

func (*BpfRecorder) Start

func (b *BpfRecorder) Start(
	ctx context.Context, r *api.EmptyRequest,
) (*api.EmptyResponse, error)

func (*BpfRecorder) Stop

func (*BpfRecorder) Syscalls added in v0.7.0

func (b *BpfRecorder) Syscalls() *bpf.BPFMap

Syscalls returns the bpf map containing the PID (key) to syscalls (value) data.

func (*BpfRecorder) SyscallsForProfile

func (b *BpfRecorder) SyscallsForProfile(
	ctx context.Context, r *api.ProfileRequest,
) (*api.SyscallsResponse, error)

SyscallsForProfile returns the syscall names for the provided profile name.

func (*BpfRecorder) Unload added in v0.7.0

func (b *BpfRecorder) Unload()

Unload can be used to reset the bpf recorder.

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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