Documentation
¶
Index ¶
Constants ¶
View Source
const ( NamespaceErrorPrefix string = "err:" NamespaceReturnPrefix string = "ret:" )
Variables ¶
This section is empty.
Functions ¶
func OpenNSFile ¶
func PutNamespaceFunction ¶
func PutNamespaceFunction(key NamespaceFunctionKey, t types.NamespaceType, f NamespaceFunction)
Types ¶
type Manager ¶
type Manager interface { Get(ref types.Reference, extraRefs ...types.Reference) (fd int, info interface{}, err error) Put(fd int) error Update(ref types.Reference, capacity int) error CleanUp() error }
Manager manages different types of namespace
type NamespaceFunction ¶
func GetNamespaceFunction ¶
func GetNamespaceFunction(key NamespaceFunctionKey, t types.NamespaceType) NamespaceFunction
type NamespaceFunctionKey ¶
type NamespaceFunctionKey string
const ( NamespaceFunctionKeyCreate NamespaceFunctionKey = "create" NamespaceFunctionKeyRelease NamespaceFunctionKey = "release" NamespaceFunctionKeyReset NamespaceFunctionKey = "reset" )
type NamespaceHelper ¶
func NewNamespaceExecCreateHelper ¶
func NewNamespaceExecCreateHelper(key NamespaceFunctionKey, nsType types.NamespaceType, args map[string]string) (*NamespaceHelper, error)
func NewNamespaceExecEnterHelper ¶
func NewNamespaceExecEnterHelper(key NamespaceFunctionKey, nsType types.NamespaceType, fdPath string, args map[string]string) (*NamespaceHelper, error)
func (*NamespaceHelper) Do ¶
func (helper *NamespaceHelper) Do(release bool) (err error)
Do executes the command
func (*NamespaceHelper) Release ¶
func (helper *NamespaceHelper) Release() error
Release releases the child process and get the return content from child process
Click to show internal directories.
Click to hide internal directories.