runtime

package
v0.0.0-...-410f0c4 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ContainerFactory

type ContainerFactory interface {
	NewManager(*logrus.Entry, *hcs.Client, string) ContainerManager
}

type ContainerManager

type ContainerManager interface {
	Spec(string) (*specs.Spec, error)
	CredentialSpec(string) (string, error)
	Create(*specs.Spec, string) error
	Exec(*specs.Process, bool) (hcs.Process, error)
	Stats() (container.Statistics, error)
	Delete(bool) error
}

type HCSQuery

type HCSQuery interface {
	GetContainers(hcsshim.ComputeSystemQuery) ([]hcsshim.ContainerProperties, error)
}

type IO

type IO struct {
	Stdin  io.Reader
	Stdout io.Writer
	Stderr io.Writer
}

type Mounter

type Mounter interface {
	Mount(pid int, volumePath string, logger *logrus.Entry) error
	Unmount(pid int) error
}

type ProcessWrapper

type ProcessWrapper interface {
	Wrap(hcs.Process) WrappedProcess
}

type Runtime

type Runtime struct {
	// contains filtered or unexported fields
}

func New

func New(s StateFactory, c ContainerFactory, m Mounter, h HCSQuery, p ProcessWrapper, rootDir, credentialSpecPath string) *Runtime

func (*Runtime) Create

func (r *Runtime) Create(containerId, bundlePath string) error

func (*Runtime) Delete

func (r *Runtime) Delete(containerId string, force bool) error

func (*Runtime) Events

func (r *Runtime) Events(containerId string, output io.Writer, showStats bool) error

func (*Runtime) Exec

func (r *Runtime) Exec(containerId, processConfigFile, pidFile string, processOverrides *specs.Process, io IO, detach bool) (int, error)

func (*Runtime) Run

func (r *Runtime) Run(containerId, bundlePath, pidFile string, io IO, detach bool) (int, error)

func (*Runtime) Start

func (r *Runtime) Start(containerId, pidFile string) error

func (*Runtime) State

func (r *Runtime) State(containerId string, output io.Writer) error

type StateFactory

type StateFactory interface {
	NewManager(*logrus.Entry, *hcs.Client, *winsyscall.WinSyscall, string, string) StateManager
}

type StateManager

type StateManager interface {
	Initialize(string) error
	Delete() error
	SetFailure() error
	SetSuccess(hcs.Process) error
	State() (*specs.State, error)
}

type WrappedProcess

type WrappedProcess interface {
	AttachIO(io.Reader, io.Writer, io.Writer) (int, error)
	SetInterrupt(chan os.Signal)
	WritePIDFile(string) error
}

Directories

Path Synopsis
fakes
Code generated by counterfeiter.
Code generated by counterfeiter.
Code generated by counterfeiter.
Code generated by counterfeiter.
fakes
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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