utils

package
v0.26.0 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const EnvIsSubProgramLoader = "PTCPDUMP-IS-SUB-PROGRAM-LOADER"

Variables

This section is empty.

Functions

func GetAllNamedNetNsName added in v0.25.0

func GetAllNamedNetNsName() ([]string, error)

func GetCgroupV2RootDir

func GetCgroupV2RootDir() (string, error)

func GetCurrentNetNsPath added in v0.25.0

func GetCurrentNetNsPath() string

func GetMountNamespaceFromPid added in v0.10.0

func GetMountNamespaceFromPid(pid int) int64

func GetNetworkNamespaceFromPid added in v0.10.0

func GetNetworkNamespaceFromPid(pid int) int64

func GetPidNamespaceFromPid added in v0.13.0

func GetPidNamespaceFromPid(pid int) int64

func GetUniqInts added in v0.18.0

func GetUniqInts(items []int) []int

func GoBytes added in v0.23.0

func GoBytes(cchars []int8) []byte

func GoString added in v0.10.0

func GoString(cstring []int8) string

func OutStderr added in v0.25.0

func OutStderr(format string, a ...interface{})

func StartSubProcess

func StartSubProcess(ctx context.Context, Args []string) error

func StartSubProcessLoader

func StartSubProcessLoader(ctx context.Context, program string, subProgramArgs []string) (int, <-chan struct{}, error)

func UnwrapErr added in v0.18.0

func UnwrapErr(err error) error

Types

type CloseFunc added in v0.25.0

type CloseFunc func()

type NetNs added in v0.25.0

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

func NewNetNs added in v0.25.0

func NewNetNs(netNsPath string) (*NetNs, error)

func (*NetNs) Do added in v0.25.0

func (n *NetNs) Do(f func()) (err error)

func (*NetNs) Inode added in v0.25.0

func (n *NetNs) Inode() uint32

func (*NetNs) Path added in v0.25.0

func (n *NetNs) Path() string

func (*NetNs) String added in v0.25.0

func (n *NetNs) String() string

Jump to

Keyboard shortcuts

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