tracer

package
v0.2.206 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateEventFromRequest added in v0.2.154

func CreateEventFromRequest(bpfEvent *http_snifferHttpevent) (*tracerhttptype.Event, error)

func ExtractConsistentHeaders

func ExtractConsistentHeaders(headers http.Header) map[string][]string

func FromCString

func FromCString(in []byte) []byte

func GetTracepointDefinitions

func GetTracepointDefinitions(objs *http_snifferPrograms) []tracepointlib.TracepointInfo

func GetUniqueIdentifier added in v0.2.154

func GetUniqueIdentifier(event *http_snifferHttpevent) string

func ParseHTTPRequest added in v0.2.154

func ParseHTTPRequest(data []byte) (*http.Request, error)

func ParseHTTPResponse added in v0.2.154

func ParseHTTPResponse(data []byte, req *http.Request) (*http.Response, error)

func ToTime added in v0.2.154

func ToTime(t eventtypes.Time) time.Time

Types

type Config

type Config struct {
	MountnsMap *ebpf.Map
}

type GadgetDesc

type GadgetDesc struct{}

func (*GadgetDesc) NewInstance

func (g *GadgetDesc) NewInstance() (gadgets.Gadget, error)

type Tracer

type Tracer struct {
	// contains filtered or unexported fields
}

func NewTracer

func NewTracer(config *Config, enricher gadgets.DataEnricherByMntNs,
	eventCallback func(*types.Event),
) (*Tracer, error)

func (*Tracer) Close

func (t *Tracer) Close()

func (*Tracer) GroupEvents added in v0.2.154

func (t *Tracer) GroupEvents(bpfEvent *http_snifferHttpevent) *types.Event

func (*Tracer) Run

func (t *Tracer) Run(gadgetCtx gadgets.GadgetContext) error

func (*Tracer) SetEventHandler

func (t *Tracer) SetEventHandler(handler any)

func (*Tracer) SetMountNsMap

func (t *Tracer) SetMountNsMap(mountnsMap *ebpf.Map)

Jump to

Keyboard shortcuts

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