common

package
v0.0.1-pre Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Copyright (c) Microsoft Corporation. Licensed under the MIT license.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewPerfReader

func NewPerfReader(l *log.ZapLogger, m *ebpf.Map, max, min int) (*perf.Reader, error)

NewPerfReader creates a new perf reader with a buffer size that is a power of 2. It starts with the maximum buffer size and tries with smaller buffer sizes if it fails with ENOMEM. Returns an error if it fails to create a perf reader or encounters any other error. Not enforced, but max and min should be a power of 2. The allocated size will be a multiple of pagesize determined at runtime.

func ProtocolToFlow

func ProtocolToFlow(protocol string) int

Interface for IG event handlers. Maps to cilum Flow.

Types

type ITracer

type ITracer interface {
	SetEventHandler(interface{})
	Attach(pid uint32) error
	Detach(pid uint32) error
	Close()
}

Interface for IG tracers. Ref: https://pkg.go.dev/github.com/inspektor-gadget/inspektor-gadget@v0.18.1/pkg/gadgets/trace/dns/tracer#Tracer

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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