tchandler

package
v0.27.0 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package tchandler handles how SchedCLS programs are attached to containers and network interfaces. The behavior is very similar to the network tracer implemented in pkg/networktracer/tracer.go. The main difference is that SchedCLS programs need to be attached to network interfaces and can be attached on ingress or egress.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AttachmentDirection

type AttachmentDirection int
const (
	AttachmentDirectionUnspec AttachmentDirection = iota
	AttachmentDirectionIngress
	AttachmentDirectionEgress
)

type Handler

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

func NewHandler

func NewHandler(direction AttachmentDirection) (*Handler, error)

func (*Handler) AttachContainer

func (t *Handler) AttachContainer(container *containercollection.Container) error

func (*Handler) AttachIface

func (t *Handler) AttachIface(iface *net.Interface) error

AttachIface attaches the tracer to the given interface on the host. See AttachContainer() if you want to attach to a container.

func (*Handler) AttachProg

func (t *Handler) AttachProg(prog *ebpf.Program) error

func (*Handler) Close

func (t *Handler) Close()

func (*Handler) DetachContainer

func (t *Handler) DetachContainer(container *containercollection.Container) error

func (*Handler) DetachIface

func (t *Handler) DetachIface(iface *net.Interface) error

Jump to

Keyboard shortcuts

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