Documentation
¶
Index ¶
Constants ¶
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)
Click to show internal directories.
Click to hide internal directories.