activator

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 9, 2024 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const BPFFSPath = "/sys/fs/bpf"

Variables

View Source
var ErrMapNotFound = errors.New("bpf map could not be found")

Functions

func MapsPath added in v0.2.0

func MapsPath() string

func MountBPFFS added in v0.2.0

func MountBPFFS(path string) error

MountBPFFS executes a mount -t bpf on the supplied path

func MountDebugFS added in v0.2.0

func MountDebugFS() error

MountBPFFS mounts the kernel debugfs

func PinPath added in v0.2.0

func PinPath(pid int) string

Types

type BPF added in v0.2.0

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

func InitBPF added in v0.2.0

func InitBPF(pid int) (*BPF, error)

func (*BPF) AttachRedirector added in v0.2.0

func (bpf *BPF) AttachRedirector(ifaces ...string) error

func (*BPF) Cleanup added in v0.2.0

func (bpf *BPF) Cleanup() error

type OnAccept

type OnAccept func() error

type Server

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

func NewServer

func NewServer(ctx context.Context, nn ns.NetNS) (*Server, error)

func (*Server) DisableRedirects added in v0.1.0

func (s *Server) DisableRedirects() error

func (*Server) RedirectPort added in v0.1.0

func (a *Server) RedirectPort(from, to uint16) error

RedirectPort redirects the port from to on ingress and to from on egress.

func (*Server) Reset added in v0.1.0

func (s *Server) Reset() error

func (*Server) Start

func (s *Server) Start(ctx context.Context, ports []uint16, onAccept OnAccept) error

func (*Server) Started added in v0.2.0

func (s *Server) Started() bool

func (*Server) Stop

func (s *Server) Stop(ctx context.Context)

Jump to

Keyboard shortcuts

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