core

package
v0.0.0-...-d12d6dc Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2017 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package core defines the interface representing the core functionality of a GCS-like program.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Core

type Core interface {
	CreateContainer(id string,
		info prot.VMHostedContainerSettings) error

	ExecProcess(id string,
		info prot.ProcessParameters,
		stdioSet *StdioSet) (pid int, err error)

	SignalContainer(id string, signal oslayer.Signal) error

	TerminateProcess(pid int) error

	ListProcesses(id string) ([]runtime.ContainerProcessState, error)

	RunExternalProcess(info prot.ProcessParameters,
		stdioSet *StdioSet) (pid int, err error)

	ModifySettings(id string,
		request prot.ResourceModificationRequestResponse) error

	RegisterContainerExitHook(id string,
		onExit func(oslayer.ProcessExitState)) error
	RegisterProcessExitHook(pid int,
		onExit func(oslayer.ProcessExitState)) error

	CleanupContainer(id string) error
}

Core is the interface defining the core functionality of the GCS-like program. For a real implementation, this may include creating and configuring containers. However, it is also easily mocked out for testing.

type StdioPipe

type StdioPipe interface {
	io.ReadWriteCloser
	CloseRead() error
	CloseWrite() error
}

StdioPipe is an interface describing a stdio pipe's available methods.

type StdioSet

type StdioSet struct {
	In  StdioPipe
	Out StdioPipe
	Err StdioPipe
}

StdioSet is a structure defining the readers and writers the Core implementation should forward a process's stdio through.

Directories

Path Synopsis
Package gcs defines the core functionality of the GCS.
Package gcs defines the core functionality of the GCS.
Package mockcore defines a mock implementation of the Core interface.
Package mockcore defines a mock implementation of the Core interface.

Jump to

Keyboard shortcuts

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