daemon

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2015 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DriversProbe

func DriversProbe() hypervisor.HypervisorDriver

Types

type Container

type Container struct {
	Id     string
	Name   string
	PodId  string
	Image  string
	Cmds   []string
	Status uint
}

type Daemon

type Daemon struct {
	ID string

	BridgeIface string
	BridgeIP    string
	Host        string
	Storage     *Storage
	// contains filtered or unexported fields
}

func NewDaemon

func NewDaemon(eng *engine.Engine) (*Daemon, error)

func NewDaemonFromDirectory

func NewDaemonFromDirectory(eng *engine.Engine) (*Daemon, error)

func (*Daemon) AddPod

func (daemon *Daemon) AddPod(pod *Pod)

func (*Daemon) AddVm

func (daemon *Daemon) AddVm(vm *Vm)

func (*Daemon) AssociateAllVms

func (daemon *Daemon) AssociateAllVms() error

This function will only be invoked during daemon start

func (*Daemon) CleanVolume

func (daemon *Daemon) CleanVolume(stop int) error

If the stop is 1, we do not delete the pool data. Or just delete it.

func (*Daemon) CmdAttach

func (daemon *Daemon) CmdAttach(job *engine.Job) (err error)

func (*Daemon) CmdCreate

func (daemon *Daemon) CmdCreate(job *engine.Job) error

func (*Daemon) CmdExec

func (daemon *Daemon) CmdExec(job *engine.Job) (err error)

func (*Daemon) CmdInfo

func (daemon *Daemon) CmdInfo(job *engine.Job) error

func (*Daemon) CmdList

func (daemon *Daemon) CmdList(job *engine.Job) error

func (*Daemon) CmdPodCreate

func (daemon *Daemon) CmdPodCreate(job *engine.Job) error

func (*Daemon) CmdPodInfo

func (daemon *Daemon) CmdPodInfo(job *engine.Job) error

func (*Daemon) CmdPodRm

func (daemon *Daemon) CmdPodRm(job *engine.Job) (err error)

func (*Daemon) CmdPodRun

func (daemon *Daemon) CmdPodRun(job *engine.Job) error

func (*Daemon) CmdPodStart

func (daemon *Daemon) CmdPodStart(job *engine.Job) error

func (*Daemon) CmdPodStop

func (daemon *Daemon) CmdPodStop(job *engine.Job) error

func (*Daemon) CmdPull

func (daemon *Daemon) CmdPull(job *engine.Job) error

func (*Daemon) CmdTty

func (daemon *Daemon) CmdTty(job *engine.Job) (err error)

func (*Daemon) CmdVersion

func (daemon *Daemon) CmdVersion(job *engine.Job) error

func (*Daemon) CmdVmCreate

func (daemon *Daemon) CmdVmCreate(job *engine.Job) (err error)

func (*Daemon) CmdVmKill

func (daemon *Daemon) CmdVmKill(job *engine.Job) error

func (*Daemon) CreatePod

func (daemon *Daemon) CreatePod(podArgs, podId string, wg *sync.WaitGroup) error

func (*Daemon) CreateVolume

func (daemon *Daemon) CreateVolume(podId, volName, dev_id string, restore bool) error

func (*Daemon) DeletePodContainerFromDB

func (daemon *Daemon) DeletePodContainerFromDB(podName string) error

func (*Daemon) DeletePodFromDB

func (daemon *Daemon) DeletePodFromDB(podName string) error

func (*Daemon) DeleteQemuChan

func (daemon *Daemon) DeleteQemuChan(vmid string) error

func (*Daemon) DeleteVmByPod

func (daemon *Daemon) DeleteVmByPod(podId string) error

func (*Daemon) DeleteVmData

func (daemon *Daemon) DeleteVmData(vmId string) error

func (*Daemon) DeleteVolumeId

func (daemon *Daemon) DeleteVolumeId(podId string) error

func (*Daemon) DestroyAllVm

func (daemon *Daemon) DestroyAllVm() error

func (*Daemon) DestroyAndKeepVm

func (daemon *Daemon) DestroyAndKeepVm() error

func (*Daemon) GetMaxDeviceId

func (daemon *Daemon) GetMaxDeviceId() (int, error)

func (*Daemon) GetPodByContainer

func (daemon *Daemon) GetPodByContainer(containerId string) (string, error)

func (*Daemon) GetPodByName

func (daemon *Daemon) GetPodByName(podName string) ([]byte, error)

func (*Daemon) GetPodContainersByName

func (daemon *Daemon) GetPodContainersByName(podName string) ([]string, error)

func (*Daemon) GetPodNum

func (daemon *Daemon) GetPodNum() int64

func (*Daemon) GetPodVmByName

func (daemon *Daemon) GetPodVmByName(podName string) (string, error)

func (*Daemon) GetQemuChan

func (daemon *Daemon) GetQemuChan(vmid string) (interface{}, interface{}, interface{}, error)

func (*Daemon) GetRunningPodNum

func (daemon *Daemon) GetRunningPodNum() int64

func (*Daemon) GetVmByPod

func (daemon *Daemon) GetVmByPod(podId string) (string, error)

func (*Daemon) GetVmData

func (daemon *Daemon) GetVmData(vmId string) ([]byte, error)

func (*Daemon) GetVolumeId

func (daemon *Daemon) GetVolumeId(podId, volName string) (int, error)

func (*Daemon) Install

func (daemon *Daemon) Install(eng *engine.Engine) error

Install installs daemon capabilities to eng.

func (*Daemon) KillVm

func (daemon *Daemon) KillVm(vmId string) (int, string, error)

func (*Daemon) ReleaseAllVms

func (daemon *Daemon) ReleaseAllVms() (int, error)

func (*Daemon) RemovePod

func (daemon *Daemon) RemovePod(podId string)

func (*Daemon) RemoveVm

func (daemon *Daemon) RemoveVm(vmId string)

func (*Daemon) RestartPod

func (daemon *Daemon) RestartPod(mypod *Pod) error

The caller must make sure that the restart policy and the status is right to restart

func (*Daemon) Restore

func (daemon *Daemon) Restore() error

func (*Daemon) SetContainerStatus

func (daemon *Daemon) SetContainerStatus(podId string, status uint)

func (*Daemon) SetPodByContainer

func (daemon *Daemon) SetPodByContainer(containerId, podId, name, image string, cmds []string, status uint) error

func (*Daemon) SetPodContainerStatus

func (daemon *Daemon) SetPodContainerStatus(podId string, data []uint32)

func (*Daemon) SetQemuChan

func (daemon *Daemon) SetQemuChan(vmid string, qemuchan, qemuclient, subQemuClient interface{}) error

func (*Daemon) SetVolumeId

func (daemon *Daemon) SetVolumeId(podId, volName, dev_id string) error

func (*Daemon) StartPod

func (daemon *Daemon) StartPod(podId, vmId, podArgs string) (int, string, error)

func (*Daemon) StopPod

func (daemon *Daemon) StopPod(podId, stopVm string) (int, string, error)

func (*Daemon) UpdateVmByPod

func (daemon *Daemon) UpdateVmByPod(podId, vmId string) error

func (*Daemon) UpdateVmData

func (daemon *Daemon) UpdateVmData(vmId string, data []byte) error

func (*Daemon) WritePodAndContainers

func (daemon *Daemon) WritePodAndContainers(podName string) error

func (*Daemon) WritePodToDB

func (daemon *Daemon) WritePodToDB(podName string, podData []byte) error

type Pod

type Pod struct {
	Id            string
	Name          string
	Vm            string
	Wg            *sync.WaitGroup
	Containers    []*Container
	Status        uint
	Type          string
	RestartPolicy string
}

type Storage

type Storage struct {
	StorageType string
	PoolName    string
	Fstype      string
	RootPath    string
	DmPoolData  *dm.DeviceMapper
}

type Vm

type Vm struct {
	Id     string
	Pod    *Pod
	Status uint
	Cpu    int
	Mem    int
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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