hypervisor

package
v0.0.0-...-88bc37c Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2018 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterProvider

func RegisterProvider(name string, p HypervisorProvider) error

Types

type Base

type Base struct {
	Log      *logrus.Entry
	Instance *model.Instance
}

type Closed

type Closed error

type Console

type Console interface {
	Attach(param *ConsoleParam) (<-chan Closed, error)
	Exec(param *ConsoleParam, args []string) (<-chan Closed, error)
	Wait() error
	ForceClose() error
}

type ConsoleParam

type ConsoleParam struct {
	Stdin  io.Reader
	Stdout io.Writer
	Stderr io.Writer
	Envs   map[string]string
}

func NewConsoleParam

func NewConsoleParam(stdin io.Reader, stdout, stderr io.Writer) *ConsoleParam

type ConsoleWaitError

type ConsoleWaitError interface {
	error
	ExitCode() int
}

type ContainerState

type ContainerState int

type HypervisorDriver

type HypervisorDriver interface {
	Recover(model.InstanceState) error
	CreateInstance() error
	DestroyInstance() error
	StartInstance() error
	StopInstance() error
	RebootInstance() error
	InstanceConsole() Console
}

type HypervisorProvider

type HypervisorProvider interface {
	Name() string
	CreateDriver(instance *model.Instance, template model.ResourceTemplate) (HypervisorDriver, error)
	LoadConfig(viper *viper.Viper) error
}

func FindProvider

func FindProvider(name string) (p HypervisorProvider, ok bool)

type PtyConsole

type PtyConsole interface {
	AttachPty(param *ConsoleParam, ptyreq *SSHPtyReq) (<-chan Closed, error)
	UpdateWindowSize(w, h uint32) error
}

type SSHPtyReq

type SSHPtyReq struct {
	Term     string
	Columns  uint32
	Rows     uint32
	Width    uint32
	Height   uint32
	Modelist string
}

Compatible with "type ptyRequestMsg struct" in golang.org/x/crypto/ssh/session.go

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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