Documentation
¶
Overview ¶
Package vm defines the interface for vm managers and instances
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Instance ¶
type Instance interface {
SetCPUAndMemory(ctx context.Context, cpu uint8, ram uint32) error
AddFS(ctx context.Context, tag, mountPath string, opts ...MountOpt) error
AddDisk(ctx context.Context, blockID, mountPath string, opts ...MountOpt) error
AddNIC(ctx context.Context, endpoint string, mac net.HardwareAddr, mode NetworkMode, features, flags uint32) error
Start(ctx context.Context, opts ...StartOpt) error
Client() *ttrpc.Client
Shutdown(context.Context) error
// StartStream makes a connection to the VM for streaming, returning a 32-bit
// identifier for the stream that can be used to reference the stream inside
// the vm.
//
// TODO: Consider making this interface optional, a per RPC implementation
// is possible but likely less efficient.
StartStream(ctx context.Context) (uint32, net.Conn, error)
}
type MountConfig ¶
type NetworkMode ¶
type NetworkMode int
const ( NetworkModeUnixgram NetworkMode = iota NetworkModeUnixstream )
Click to show internal directories.
Click to hide internal directories.