Versions in this module Expand all Collapse all v0 v0.2.1 Jul 6, 2015 Changes in this version + const BaseDir + const COMMAND_ACK + const COMMAND_ATTACH + const COMMAND_DETACH + const COMMAND_EXEC + const COMMAND_RELEASE + const COMMAND_REPLACE_POD + const COMMAND_RUN_POD + const COMMAND_SHUTDOWN + const COMMAND_STOP_POD + const COMMAND_WINDOWSIZE + const ConsoleSockName + const DefaultInitrd + const DefaultKernel + const ERROR_CMD_FAIL + const ERROR_INIT_FAIL + const ERROR_INTERRUPTED + const ERROR_QMP_FAIL + const EVENT_BLOCK_EJECTED + const EVENT_BLOCK_INSERTED + const EVENT_CONTAINER_ADD + const EVENT_CONTAINER_DELETE + const EVENT_INIT_CONNECTED + const EVENT_INTERFACE_ADD + const EVENT_INTERFACE_DELETE + const EVENT_INTERFACE_EJECTED + const EVENT_INTERFACE_INSERTED + const EVENT_POD_FINISH + const EVENT_SERIAL_ADD + const EVENT_SERIAL_DELETE + const EVENT_TTY_CLOSE + const EVENT_TTY_OPEN + const EVENT_VM_EXIT + const EVENT_VM_KILL + const EVENT_VM_START_FAILED + const EVENT_VM_TIMEOUT + const EVENT_VOLUME_ADD + const EVENT_VOLUME_DELETE + const ExitChar + const HyperSockName + const INIT_ACK + const INIT_DESTROYPOD + const INIT_ERROR + const INIT_EXECCMD + const INIT_FINISHCMD + const INIT_FINISHPOD + const INIT_GETPOD + const INIT_NEWCONTAINER + const INIT_PING + const INIT_READY + const INIT_RESERVED + const INIT_STARTPOD + const INIT_STOPPOD + const INIT_WINSIZE + const InterfaceCount + const PREPARING_BIND_DIR + const PREPARING_BLOCK + const PREPARING_CONTAINER + const PREPARING_VOLUME + const PciAddrFrom + const ShareDirTag + const TtySockName + func CreateContainer(userPod *pod.UserPod, sharedDir string, hub chan VmEvent) (string, error) + func CreateInterface(index int, pciAddr int, name string, isDefault bool, addrOnly bool, ...) + func DiskId2Name(id int) string + func EventString(ev int) string + func ReleaseInterface(index int, ipAddr string, file *os.File, maps []pod.UserContainerPort, ...) + func TtyLiner(conn io.Reader, output chan string) + func UmountAufsContainer(shareDir, image string, index int, hub chan VmEvent) + func UmountDMDevice(deviceFullPath, name string, hub chan VmEvent) + func UmountOverlayContainer(shareDir, image string, index int, hub chan VmEvent) + func UmountVolume(shareDir, volPath string, name string, hub chan VmEvent) + func UnixSocketConnect(name string) (conn net.Conn, err error) + func VmAssociate(driver HypervisorDriver, vmId string, hub chan VmEvent, ...) + func VmLoop(driver HypervisorDriver, vmId string, hub chan VmEvent, ...) + type AttachCommand struct + Container string + Size *WindowSize + Streams *TtyIO + func (qe *AttachCommand) Event() int + type BlockdevInsertedEvent struct + DeviceName string + Name string + ScsiId int + SourceType string + func (qe *BlockdevInsertedEvent) Event() int + type BlockdevRemovedEvent struct + Name string + Success bool + func (qe *BlockdevRemovedEvent) Event() int + type BootConfig struct + Bios string + CPU int + Cbfs string + Initrd string + Kernel string + Memory int + type CommandAck struct + func (qe *CommandAck) Event() int + type CommandError struct + func (qe *CommandError) Event() int + type ContainerCreatedEvent struct + Cmd []string + Entrypoint []string + Envs map[string]string + Fstype string + Id string + Image string + Index int + Rootfs string + Workdir string + func (qe *ContainerCreatedEvent) Event() int + type ContainerInfo struct + Cmd []string + Entrypoint []string + Envs map[string]string + Fstype string + Id string + Image string + Rootfs string + Workdir string + type ContainerUnmounted struct + Index int + Success bool + func (qe *ContainerUnmounted) Event() int + type DecodedMessage struct + type DeviceFailed struct + Session VmEvent + func (qe *DeviceFailed) Event() int + type DriverContext interface + AddDisk func(ctx *VmContext, name, sourceType, filename, format string, id int) + AddNic func(ctx *VmContext, host *HostNicInfo, guest *GuestNicInfo) + Associate func(ctx *VmContext) + BuildinNetwork func() bool + Close func() + Dump func() (map[string]interface{}, error) + Kill func(ctx *VmContext) + Launch func(ctx *VmContext) + RemoveDisk func(ctx *VmContext, filename, format string, id int, callback VmEvent) + RemoveNic func(ctx *VmContext, device, mac string, callback VmEvent) + Shutdown func(ctx *VmContext) + type EmptyContext struct + func (ec *EmptyContext) AddDisk(ctx *VmContext, name, sourceType, filename, format string, id int) + func (ec *EmptyContext) AddNic(ctx *VmContext, host *HostNicInfo, guest *GuestNicInfo) + func (ec *EmptyContext) Associate(ctx *VmContext) + func (ec *EmptyContext) BuildinNetwork() bool + func (ec *EmptyContext) Close() + func (ec *EmptyContext) Dump() (map[string]interface{}, error) + func (ec *EmptyContext) Kill(ctx *VmContext) + func (ec *EmptyContext) Launch(ctx *VmContext) + func (ec *EmptyContext) RemoveDisk(ctx *VmContext, filename, format string, id int, callback VmEvent) + func (ec *EmptyContext) RemoveNic(ctx *VmContext, device, mac string, callback VmEvent) + func (ec *EmptyContext) Shutdown(ctx *VmContext) + type EmptyDriver struct + func (ed *EmptyDriver) InitContext(homeDir string) DriverContext + func (ed *EmptyDriver) Initialize() error + func (ed *EmptyDriver) LoadContext(persisted map[string]interface{}) (DriverContext, error) + type ExecCommand struct + Command []string + Container string + Sequence uint64 + Streams *TtyIO + func (qe *ExecCommand) Event() int + type FinishCmd struct + Seq uint64 + type GuestNicInfo struct + Busaddr int + Device string + Index int + Ipaddr string + type HostNicInfo struct + Bridge string + Device string + Fd uint64 + Gateway string + Mac string + type HypervisorDriver interface + InitContext func(homeDir string) DriverContext + Initialize func() error + LoadContext func(persisted map[string]interface{}) (DriverContext, error) + type InitConnectedEvent struct + func (qe *InitConnectedEvent) Event() int + type InitFailedEvent struct + Reason string + func (qe *InitFailedEvent) Event() int + type InterfaceCreated struct + Bridge string + DeviceName string + Fd *os.File + HostDevice string + Index int + IpAddr string + MacAddr string + NetMask string + PCIAddr int + RouteTable []*RouteRule + func (qe *InterfaceCreated) Event() int + type InterfaceReleased struct + Index int + Success bool + func (qe *InterfaceReleased) Event() int + type Interrupted struct + Reason string + func (qe *Interrupted) Event() int + type NetDevInsertedEvent struct + Address int + DeviceName string + Index int + func (qe *NetDevInsertedEvent) Event() int + type NetDevRemovedEvent struct + Index int + func (qe *NetDevRemovedEvent) Event() int + type PersistInfo struct + DriverInfo map[string]interface{} + HwStat *VmHwStatus + Id string + NetworkList []*PersistNetworkInfo + UserSpec *pod.UserPod + VmSpec *VmPod + VolumeList []*PersistVolumeInfo + type PersistNetworkInfo struct + DeviceName string + Index int + IpAddr string + PciAddr int + type PersistVolumeInfo struct + Containers []int + DeviceName string + Filename string + Format string + Fstype string + MontPoints []string + Name string + ScsiId int + type PodFinished struct + func (qe *PodFinished) Event() int + type PreparingItem interface + ItemType func() string + type ReleaseVMCommand struct + func (qe *ReleaseVMCommand) Event() int + type ReplacePodCommand RunPodCommand + func (qe *ReplacePodCommand) Event() int + type RouteRule struct + Destination string + Gateway string + ViaThis bool + type RunPodCommand struct + Containers []*ContainerInfo + Spec *pod.UserPod + Volumes []*VolumeInfo + Wg *sync.WaitGroup + func (qe *RunPodCommand) Event() int + type RunningContainer struct + Id string + type ShutdownCommand struct + Wait bool + func (qe *ShutdownCommand) Event() int + type StopPodCommand struct + func (qe *StopPodCommand) Event() int + type TtyIO struct + Callback chan *types.QemuResponse + ClientTag string + Stdin io.ReadCloser + Stdout io.WriteCloser + func LinerTty(output chan string) *TtyIO + func (tty *TtyIO) Close() string + type VmContainer struct + Cmd []string + Entrypoint []string + Envs []VmEnvironmentVar + Fsmap []VmFsmapDescriptor + Fstype string + Id string + Image string + RestartPolicy string + Rootfs string + Tty uint64 + Volumes []VmVolumeDescriptor + Workdir string + type VmContext struct + Boot *BootConfig + ConsoleSockName string + DCtx DriverContext + HomeDir string + Hub chan VmEvent + HyperSockName string + Id string + ShareDir string + TtySockName string + func InitContext(dr HypervisorDriver, id string, hub chan VmEvent, ...) (*VmContext, error) + func (ctx *VmContext) Become(handler stateHandler, desc string) + func (ctx *VmContext) Close() + func (ctx *VmContext) InitDeviceContext(spec *pod.UserPod, wg *sync.WaitGroup, cInfo []*ContainerInfo, ...) + func (ctx *VmContext) Lookup(container string) int + type VmEnvironmentVar struct + Env string + Value string + type VmEvent interface + Event func() int + type VmExit struct + func (qe *VmExit) Event() int + type VmFsmapDescriptor struct + Path string + ReadOnly bool + Source string + type VmHwStatus struct + AttachId uint64 + PciAddr int + ScsiId int + type VmKilledEvent struct + Success bool + func (qe *VmKilledEvent) Event() int + type VmNetworkInf struct + Device string + IpAddress string + NetMask string + type VmOnDiskInfo struct + ConsoleSockName string + HyperSockName string + QmpSockName string + ShareDir string + TtySockName string + type VmPod struct + Containers []VmContainer + Hostname string + Interfaces []VmNetworkInf + Routes []VmRoute + ShareDir string + type VmRoute struct + Dest string + Device string + Gateway string + type VmStartFailEvent struct + Message string + func (qe *VmStartFailEvent) Event() int + type VmTimeout struct + func (qe *VmTimeout) Event() int + type VmVolumeDescriptor struct + Device string + Fstype string + Mount string + ReadOnly bool + type VolumeInfo struct + Filepath string + Format string + Fstype string + Name string + type VolumeReadyEvent struct + Filepath string + Format string + Fstype string + Name string + func (qe *VolumeReadyEvent) Event() int + type VolumeUnmounted struct + Name string + Success bool + func (qe *VolumeUnmounted) Event() int + type WindowSize struct + Column uint16 + Row uint16 + type WindowSizeCommand struct + ClientTag string + Size *WindowSize + func (qe *WindowSizeCommand) Event() int