hyperstart

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2016 License: Apache-2.0 Imports: 8 Imported by: 8 modules, 4 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	Version          = "version"
	StartPod         = "startpod"
	GetPod           = "getpod"
	DestroyPod       = "destroypod"
	RestartContainer = "restartcontainer"
	ExecCmd          = "execcmd"
	FinishCmd        = "finishcmd"
	Ready            = "ready"
	Ack              = "ack"
	Error            = "error"
	WinSize          = "winsize"
	Ping             = "ping"
	FinishPod        = "finishpod"
	Next             = "next"
	WriteFile        = "writefile"
	ReadFile         = "readfile"
	NewContainer     = "newcontainer"
	KillContainer    = "killcontainer"
	OnlineCPUMem     = "onlinecpumem"
	SetupInterface   = "setupinterface"
	SetupRoute       = "setuproute"
)

Control command IDs Need to be in sync with hyperstart/src/api.h

Variables

This section is empty.

Functions

func FormatMessage

func FormatMessage(payload interface{}) ([]byte, error)

FormatMessage formats hyperstart messages.

func ReadIoMessageWithConn added in v0.2.0

func ReadIoMessageWithConn(conn net.Conn) (*hyper.TtyMessage, error)

ReadIoMessageWithConn returns data coming from the specified IO channel.

func SendIoMessageWithConn added in v0.2.0

func SendIoMessageWithConn(conn net.Conn, ttyMsg *hyper.TtyMessage) error

SendIoMessageWithConn sends data to the specified IO channel.

Types

type Hyperstart

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

Hyperstart is the base structure for hyperstart.

func NewHyperstart

func NewHyperstart(ctlSerial, ioSerial, sockType string) *Hyperstart

NewHyperstart returns a new hyperstart structure.

func (*Hyperstart) CloseSockets

func (h *Hyperstart) CloseSockets() error

CloseSockets closes both CTL and IO sockets.

func (*Hyperstart) IsStarted

func (h *Hyperstart) IsStarted() bool

IsStarted returns about connection status.

func (*Hyperstart) OpenSockets

func (h *Hyperstart) OpenSockets() error

OpenSockets opens both CTL and IO sockets.

func (*Hyperstart) ReadIoMessage

func (h *Hyperstart) ReadIoMessage() (*hyper.TtyMessage, error)

ReadIoMessage returns data coming from the IO channel.

func (*Hyperstart) SendCtlMessage

func (h *Hyperstart) SendCtlMessage(cmd string, data []byte) (*hyper.DecodedMessage, error)

SendCtlMessage sends a message to the CTL channel.

func (*Hyperstart) SendIoMessage

func (h *Hyperstart) SendIoMessage(ttyMsg *hyper.TtyMessage) error

SendIoMessage sends data to the IO channel.

func (*Hyperstart) SetDeadline

func (h *Hyperstart) SetDeadline(t time.Time) error

SetDeadline sets a timeout for CTL connection.

func (*Hyperstart) WaitForReady

func (h *Hyperstart) WaitForReady() error

WaitForReady waits for a READY message on CTL channel.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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