namespace

package
v0.0.0-...-45677c0 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PROC_PATH = "/proc"
)

Variables

This section is empty.

Functions

func DeleteCurrentNetNSHandler

func DeleteCurrentNetNSHandler(fd int)

func ForEachNetNS

func ForEachNetNS(ctx interface{}, fn func(interface{}) error)

func GetCurrentNetNSHandler

func GetCurrentNetNSHandler() (int, error)

func SetNetNs

func SetNetNs(fd int) error

Types

type NameSpace

type NameSpace struct {
	Process *Process
	Ino     uint64
	Dir     string
	OpenFd  int
}

func ReadAllNetNameSpaces

func ReadAllNetNameSpaces() ([]NameSpace, error)

func (*NameSpace) DeleteNetNSHandler

func (ns *NameSpace) DeleteNetNSHandler()

func (*NameSpace) GetNetNSHandler

func (ns *NameSpace) GetNetNSHandler() (int, error)

func (*NameSpace) String

func (n *NameSpace) String() string

type Process

type Process struct {
	PID int
}

func ReadAllProcesses

func ReadAllProcesses() ([]Process, error)

func (*Process) String

func (p *Process) String() string

Jump to

Keyboard shortcuts

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