docker: Index | Files

package exec

import ""


Package Files


type Config Uses

type Config struct {
    Started      chan struct{}
    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
    WorkingDir   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 Uses

func NewConfig() *Config

NewConfig initializes the a new exec configuration

func (*Config) CloseStreams Uses

func (c *Config) CloseStreams() error

CloseStreams closes the stdio streams for the exec

func (*Config) InitializeStdio Uses

func (c *Config) InitializeStdio(iop *cio.DirectIO) (cio.IO, error)

InitializeStdio is called by libcontainerd to connect the stdio.

func (*Config) SetExitCode Uses

func (c *Config) SetExitCode(code int)

SetExitCode sets the exec config's exit code

type Store Uses

type Store struct {
    // contains filtered or unexported fields

Store keeps track of the exec configurations.

func NewStore Uses

func NewStore() *Store

NewStore initializes a new exec store.

func (*Store) Add Uses

func (e *Store) Add(id string, Config *Config)

Add adds a new exec configuration to the store.

func (*Store) Commands Uses

func (e *Store) Commands() map[string]*Config

Commands returns the exec configurations in the store.

func (*Store) Delete Uses

func (e *Store) Delete(id string, pid int)

Delete removes an exec configuration from the store.

func (*Store) Get Uses

func (e *Store) Get(id string) *Config

Get returns an exec configuration by its id.

func (*Store) List Uses

func (e *Store) List() []string

List returns the list of exec ids in the store.

Package exec imports 7 packages (graph) and is imported by 838 packages. Updated 2019-07-25. Refresh now. Tools for package owners.