Documentation
¶
Overview ¶
Package namespace supplies the operation about linux namespace.
Index ¶
- Variables
- type NameSpace
- func (ns NameSpace) Create() (err error)
- func (ns NameSpace) Delete() (err error)
- func (ns NameSpace) Exec(cmd string, args ...string) (output string, err error)
- func (ns NameSpace) IsExist() (exist bool, err error)
- func (ns NameSpace) Pids() (pids []int, err error)
- func (ns NameSpace) String() string
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNoNameSpace = errors.New("no namespace")
ErrNoNameSpace is returned when no namespace associates with a given process.
Functions ¶
This section is empty.
Types ¶
type NameSpace ¶
type NameSpace struct {
Name string
}
NameSpace is the Linux NameSpace instance.
func GetAllNameSpace ¶
GetAllNameSpace returns all the namespace instances.
func NewNameSpace ¶
NewNameSpace returns a new NameSpace instance named name.
func NewNameSpaceFromPid ¶
NewNameSpaceFromPid returns a new NameSpace instance by the process pid.
Click to show internal directories.
Click to hide internal directories.