package exec
import "github.com/docker/cli/components/engine/daemon/exec"
Index ¶
- type Config
- func NewConfig() *Config
- func (c *Config) CloseStreams() error
- func (c *Config) InitializeStdio(iop *libcontainerd.IOPipe) (containerd.IO, error)
- func (c *Config) SetExitCode(code int)
- type Store
- func NewStore() *Store
- func (e *Store) Add(id string, Config *Config)
- func (e *Store) ByPid(pid int) *Config
- func (e *Store) Commands() map[string]*Config
- func (e *Store) Delete(id string, pid int)
- func (e *Store) Get(id string) *Config
- func (e *Store) List() []string
- func (e *Store) SetPidUnlocked(id string, pid int)
Types ¶
type Config ¶
type Config struct { sync.Mutex StreamConfig *stream.Config ID string Running bool ExitCode *int OpenStdin bool OpenStderr bool OpenStdout bool CanRemove bool ContainerID string DetachKeys []byte Entrypoint string Args []string Tty bool Privileged bool User string Env []string Pid int }
Config holds the configurations for execs. The Daemon keeps track of both running and finished execs so that they can be examined both during and after completion.
func NewConfig ¶
func NewConfig() *Config
NewConfig initializes the a new exec configuration
func (*Config) CloseStreams ¶
CloseStreams closes the stdio streams for the exec
func (*Config) InitializeStdio ¶
func (c *Config) InitializeStdio(iop *libcontainerd.IOPipe) (containerd.IO, error)
InitializeStdio is called by libcontainerd to connect the stdio.
func (*Config) SetExitCode ¶
SetExitCode sets the exec config's exit code
type Store ¶
Store keeps track of the exec configurations.
func NewStore ¶
func NewStore() *Store
NewStore initializes a new exec store.
func (*Store) Add ¶
Add adds a new exec configuration to the store.
func (*Store) ByPid ¶
ByPid returns an exec configuration by its pid.
func (*Store) Commands ¶
Commands returns the exec configurations in the store.
func (*Store) Delete ¶
Delete removes an exec configuration from the store.
func (*Store) Get ¶
Get returns an exec configuration by its id.
func (*Store) List ¶
List returns the list of exec ids in the store.
func (*Store) SetPidUnlocked ¶
SetPidUnlocked adds an association between a Pid and a config, it does not synchronized with other operations.
Source Files ¶
- Version
- v17.11.0-ce+incompatible
- Published
- Nov 20, 2017
- Platform
- linux/amd64
- Imports
- 7 packages
- Last checked
- 4 minutes ago –
Tools for package owners.