package namespaces
import "github.com/docker/docker/pkg/libcontainer/namespaces"
Index ¶
- func DeletePid(path string) error
- func Exec(container *libcontainer.Container, term Terminal, rootfs, dataPath string, args []string, createCommand CreateCommand, startCallback func()) (int, error)
- func GetNamespaceFlags(namespaces map[string]bool) (flag int)
- func Init(container *libcontainer.Container, uncleanRootfs, consolePath string, syncPipe *SyncPipe, args []string) error
- func InitializeNetworking(container *libcontainer.Container, nspid int, pipe *SyncPipe) error
- func SetupCgroups(container *libcontainer.Container, nspid int) (cgroups.ActiveCgroup, error)
- func WritePid(path string, pid int, startTime string) error
- type CreateCommand
- type StdTerminal
- func (s *StdTerminal) Attach(command *exec.Cmd) error
- func (s *StdTerminal) Close() error
- func (s *StdTerminal) Resize(h, w int) error
- func (s *StdTerminal) SetMaster(*os.File)
- type SyncPipe
- func NewSyncPipe() (s *SyncPipe, err error)
- func NewSyncPipeFromFd(parendFd, childFd uintptr) (*SyncPipe, error)
- func (s *SyncPipe) Child() *os.File
- func (s *SyncPipe) Close() error
- func (s *SyncPipe) Parent() *os.File
- func (s *SyncPipe) ReadFromParent() (libcontainer.Context, error)
- func (s *SyncPipe) SendToChild(context libcontainer.Context) error
- type Terminal
- type TtyTerminal
Functions ¶
func DeletePid ¶
DeletePid removes the pid and started file from disk when the container's process dies and the container is cleanly removed
func Exec ¶
func Exec(container *libcontainer.Container, term Terminal, rootfs, dataPath string, args []string, createCommand CreateCommand, startCallback func()) (int, error)
func GetNamespaceFlags ¶
func Init ¶
func Init(container *libcontainer.Container, uncleanRootfs, consolePath string, syncPipe *SyncPipe, args []string) error
func InitializeNetworking ¶
func InitializeNetworking(container *libcontainer.Container, nspid int, pipe *SyncPipe) error
func SetupCgroups ¶
func SetupCgroups(container *libcontainer.Container, nspid int) (cgroups.ActiveCgroup, error)
func WritePid ¶
WritePid writes the namespaced processes pid to pid and it's start time to the path specified
Types ¶
type CreateCommand ¶
type CreateCommand func(container *libcontainer.Container, console, rootfs, dataPath, init string, childPipe *os.File, args []string) *exec.Cmd
type StdTerminal ¶
type StdTerminal struct {
// contains filtered or unexported fields
}
func (*StdTerminal) Attach ¶
func (s *StdTerminal) Attach(command *exec.Cmd) error
func (*StdTerminal) Close ¶
func (s *StdTerminal) Close() error
func (*StdTerminal) Resize ¶
func (s *StdTerminal) Resize(h, w int) error
func (*StdTerminal) SetMaster ¶
func (s *StdTerminal) SetMaster(*os.File)
type SyncPipe ¶
type SyncPipe struct {
// contains filtered or unexported fields
}
SyncPipe allows communication to and from the child processes to it's parent and allows the two independent processes to syncronize their state.
func NewSyncPipe ¶
func NewSyncPipeFromFd ¶
func (*SyncPipe) Child ¶
func (*SyncPipe) Close ¶
func (*SyncPipe) Parent ¶
func (*SyncPipe) ReadFromParent ¶
func (s *SyncPipe) ReadFromParent() (libcontainer.Context, error)
func (*SyncPipe) SendToChild ¶
func (s *SyncPipe) SendToChild(context libcontainer.Context) error
type Terminal ¶
type Terminal interface { io.Closer SetMaster(*os.File) Attach(*exec.Cmd) error Resize(h, w int) error }
func NewTerminal ¶
type TtyTerminal ¶
type TtyTerminal struct {
// contains filtered or unexported fields
}
func (*TtyTerminal) Attach ¶
func (t *TtyTerminal) Attach(command *exec.Cmd) error
func (*TtyTerminal) Close ¶
func (t *TtyTerminal) Close() error
func (*TtyTerminal) Resize ¶
func (t *TtyTerminal) Resize(h, w int) error
func (*TtyTerminal) SetMaster ¶
func (t *TtyTerminal) SetMaster(master *os.File)
Source Files ¶
create.go nsenter.go pid.go std_term.go sync_pipe.go term.go tty_term.go unsupported.go
- Version
- v0.12.0
- Published
- Jun 6, 2014
- Platform
- js/wasm
- Imports
- 11 packages
- Last checked
- 4 minutes ago –
Tools for package owners.