exec

package
v17.10.0-ce-rc1+incomp... Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 23, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

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 added in v1.12.5

func (c *Config) CloseStreams() error

CloseStreams closes the stdio streams for the exec

func (*Config) InitializeStdio added in v1.12.4

func (c *Config) InitializeStdio(iop libcontainerd.IOPipe) error

InitializeStdio is called by libcontainerd to connect the stdio.

func (*Config) SetExitCode

func (c *Config) SetExitCode(code int)

SetExitCode sets the exec config's exit code

type Store

type Store struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

Store keeps track of the exec configurations.

func NewStore

func NewStore() *Store

NewStore initializes a new exec store.

func (*Store) Add

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

Add adds a new exec configuration to the store.

func (*Store) Commands

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

Commands returns the exec configurations in the store.

func (*Store) Delete

func (e *Store) Delete(id string)

Delete removes an exec configuration from the store.

func (*Store) Get

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

Get returns an exec configuration by its id.

func (*Store) List

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

List returns the list of exec ids in the store.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL