state

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: 9 Imported by: 0

Documentation

Index

Constants

View Source
const STILL_ACTIVE_EXIT_CODE = uint32(259)

Variables

This section is empty.

Functions

This section is empty.

Types

type HCSClient

type HCSClient interface {
	GetContainerProperties(string) (hcsshim.ContainerProperties, error)
}

type Manager

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

func New

func New(logger *logrus.Entry, hcsClient HCSClient, winSyscall WinSyscall, id, rootDir string) *Manager

func (*Manager) Delete

func (m *Manager) Delete() error

func (*Manager) Initialize

func (m *Manager) Initialize(bundlePath string) error

func (*Manager) SetFailure

func (m *Manager) SetFailure() error

func (*Manager) SetSuccess

func (m *Manager) SetSuccess(proc hcs.Process) error

func (*Manager) State

func (m *Manager) State() (*specs.State, error)

type State

type State struct {
	Bundle     string           `json:"bundle"`
	PID        int              `json:"pid"`
	StartTime  syscall.Filetime `json:"start_time"`
	ExecFailed bool             `json:"exec_failed"`
}

type WinSyscall

type WinSyscall interface {
	OpenProcess(uint32, bool, uint32) (syscall.Handle, error)
	GetProcessStartTime(syscall.Handle) (syscall.Filetime, error)
	CloseHandle(syscall.Handle) error
	GetExitCodeProcess(syscall.Handle) (uint32, error)
}

Directories

Path Synopsis
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