oci

package
v3.1.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2019 License: BSD-3-Clause Imports: 38 Imported by: 0

Documentation

Index

Constants

View Source
const Name = "oci"

Name of the engine

Variables

This section is empty.

Functions

This section is empty.

Types

type EngineConfig

type EngineConfig struct {
	BundlePath    string           `json:"bundlePath"`
	LogPath       string           `json:"logPath"`
	LogFormat     string           `json:"logFormat"`
	PidFile       string           `json:"pidFile"`
	OciConfig     *oci.Config      `json:"ociConfig"`
	State         ociruntime.State `json:"state"`
	MasterPts     int              `json:"masterPts"`
	SlavePts      int              `json:"slavePts"`
	OutputStreams [2]int           `json:"outputStreams"`
	ErrorStreams  [2]int           `json:"errorStreams"`
	InputStreams  [2]int           `json:"inputStreams"`
	SyncSocket    string           `json:"syncSocket"`
	EmptyProcess  bool             `json:"emptyProcess"`
	Exec          bool             `json:"exec"`
	Cgroups       *cgroups.Manager `json:"-"`
	sync.Mutex    `json:"-"`
}

EngineConfig is the config for the OCI engine.

func NewConfig

func NewConfig() *EngineConfig

NewConfig returns an oci.EngineConfig.

func (*EngineConfig) GetBundlePath

func (e *EngineConfig) GetBundlePath() string

GetBundlePath returns the container bundle path.

func (*EngineConfig) GetLogFormat

func (e *EngineConfig) GetLogFormat() string

GetLogFormat returns the container log format.

func (*EngineConfig) GetLogPath

func (e *EngineConfig) GetLogPath() string

GetLogPath returns the container log path.

func (*EngineConfig) GetPidFile

func (e *EngineConfig) GetPidFile() string

GetPidFile gets the pid file path.

func (*EngineConfig) GetState

func (e *EngineConfig) GetState() *ociruntime.State

GetState returns the container state as defined by OCI state specification

func (*EngineConfig) SetBundlePath

func (e *EngineConfig) SetBundlePath(path string)

SetBundlePath sets the container bundle path.

func (*EngineConfig) SetLogFormat

func (e *EngineConfig) SetLogFormat(format string)

SetLogFormat sets the container log format.

func (*EngineConfig) SetLogPath

func (e *EngineConfig) SetLogPath(path string)

SetLogPath sets the container log path.

func (*EngineConfig) SetPidFile

func (e *EngineConfig) SetPidFile(path string)

SetPidFile sets the pid file path.

func (*EngineConfig) SetState

func (e *EngineConfig) SetState(state *ociruntime.State)

SetState sets the container state as defined by OCI state specification

type EngineOperations

type EngineOperations struct {
	CommonConfig *config.Common `json:"-"`
	EngineConfig *EngineConfig  `json:"engineConfig"`
}

EngineOperations describes a runtime engine

func (*EngineOperations) CleanupContainer

func (engine *EngineOperations) CleanupContainer(fatal error, status syscall.WaitStatus) error

CleanupContainer cleans up the container

func (*EngineOperations) Config

func (e *EngineOperations) Config() config.EngineConfig

Config returns a pointer to a singularity.EngineConfig literal as a config.EngineConfig interface. This pointer gets stored in the Engine.Common field.

func (*EngineOperations) CreateContainer

func (engine *EngineOperations) CreateContainer(pid int, rpcConn net.Conn) error

CreateContainer creates a container

func (*EngineOperations) InitConfig

func (e *EngineOperations) InitConfig(cfg *config.Common)

InitConfig stores the pointer to config.Common

func (*EngineOperations) MonitorContainer

func (engine *EngineOperations) MonitorContainer(pid int, signals chan os.Signal) (syscall.WaitStatus, error)

MonitorContainer monitors a container

func (*EngineOperations) PostStartProcess

func (engine *EngineOperations) PostStartProcess(pid int) error

PostStartProcess will execute code in master context after execution of container process, typically to write instance state/config files or execute post start OCI hook

func (*EngineOperations) PreStartProcess

func (engine *EngineOperations) PreStartProcess(pid int, masterConn net.Conn, fatalChan chan error) error

PreStartProcess will be executed in master context

func (*EngineOperations) PrepareConfig

func (e *EngineOperations) PrepareConfig(starterConfig *starter.Config) error

PrepareConfig checks and prepares the runtime engine config

func (*EngineOperations) StartProcess

func (engine *EngineOperations) StartProcess(masterConn net.Conn) error

StartProcess starts the process

Directories

Path Synopsis
rpc

Jump to

Keyboard shortcuts

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