libhyperstart

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2017 License: Apache-2.0 Imports: 18 Imported by: 1

Documentation

Index

Constants

View Source
const (
	ERROR   = hlog.ERROR
	WARNING = hlog.WARNING
	INFO    = hlog.INFO
	DEBUG   = hlog.DEBUG
	TRACE   = hlog.TRACE
	EXTRA   = hlog.EXTRA
)

Variables

View Source
var NewHyperstart = NewJsonBasedHyperstart

Functions

func StdioPipe added in v1.0.0

func StdioPipe(h Hyperstart, c, p string) (io.WriteCloser, io.Reader, io.Reader)

Types

type Hyperstart

type Hyperstart interface {
	Close()
	LastStreamSeq() uint64

	PauseSync() error
	Unpause() error

	APIVersion() (uint32, error)
	NewContainer(c *hyperstartapi.Container) error
	RestoreContainer(c *hyperstartapi.Container) error
	AddProcess(container string, p *hyperstartapi.Process) error
	SignalProcess(container, process string, signal syscall.Signal) error
	WaitProcess(container, process string) int

	WriteStdin(container, process string, data []byte) (int, error)
	ReadStdout(container, process string, data []byte) (int, error)
	ReadStderr(container, process string, data []byte) (int, error)
	CloseStdin(container, process string) error
	TtyWinResize(container, process string, row, col uint16) error

	StartSandbox(pod *hyperstartapi.Pod) error
	DestroySandbox() error
	WriteFile(container, path string, data []byte) error
	ReadFile(container, path string) ([]byte, error)
	AddRoute(r []hyperstartapi.Route) error
	UpdateInterface(dev string, addresses []hyperstartapi.IpAddress) error
	OnlineCpuMem() error
}

Hyperstart interface to hyperstart API

func NewGrpcBasedHyperstart added in v1.0.0

func NewGrpcBasedHyperstart(hyperstartGRPCSock string) (Hyperstart, error)

NewGrpcBasedHyperstart create hyperstart interface with grpc protocol

func NewJsonBasedHyperstart

func NewJsonBasedHyperstart(id, ctlSock, streamSock string, lastStreamSeq uint64, waitReady, paused bool) (Hyperstart, error)

Jump to

Keyboard shortcuts

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