xen

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: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DEFAULT_XEN_LOG       = "/var/log/hyper/xen.log"
	REQUIRED_VERSION      = 4005000
	PCI_AVAILABLE_ADDRESS = 3
)
View Source
const (
	LIBXL_DISK_FORMAT_UNKNOWN = C.LIBXL_DISK_FORMAT_UNKNOWN
	LIBXL_DISK_FORMAT_QCOW    = C.LIBXL_DISK_FORMAT_QCOW
	LIBXL_DISK_FORMAT_QCOW2   = C.LIBXL_DISK_FORMAT_QCOW2
	LIBXL_DISK_FORMAT_VHD     = C.LIBXL_DISK_FORMAT_VHD
	LIBXL_DISK_FORMAT_RAW     = C.LIBXL_DISK_FORMAT_RAW
	LIBXL_DISK_FORMAT_EMPTY   = C.LIBXL_DISK_FORMAT_EMPTY

	LIBXL_DISK_BACKEND_UNKNOWN = C.LIBXL_DISK_BACKEND_UNKNOWN
	LIBXL_DISK_BACKEND_PHY     = C.LIBXL_DISK_BACKEND_PHY
	LIBXL_DISK_BACKEND_TAP     = C.LIBXL_DISK_BACKEND_TAP
	LIBXL_DISK_BACKEND_QDISK   = C.LIBXL_DISK_BACKEND_QDISK
)

Variables

This section is empty.

Functions

func DomainDeath_cgo

func DomainDeath_cgo(domid C.uint32_t)

func HyperDomainCleanup

func HyperDomainCleanup(ctx LibxlCtxPtr, ev unsafe.Pointer)

func HyperxlDiskAdd

func HyperxlDiskAdd(ctx LibxlCtxPtr, domid uint32, source, target string, backend LibxlDiskBackend, format LibxlDiskFormat) int

int hyperxl_disk_add(libxl_ctx* ctx, uint32_t domid,hyperxl_disk_config* config);

func HyperxlDiskRemove

func HyperxlDiskRemove(ctx LibxlCtxPtr, domid uint32, source, target string, backend LibxlDiskBackend, format LibxlDiskFormat) int

int hyperxl_disk_remove(libxl_ctx* ctx, uint32_t domid,hyperxl_disk_config* config);

func HyperxlDomainCheck

func HyperxlDomainCheck(ctx LibxlCtxPtr, domid uint32) int

func HyperxlDomainDestroy

func HyperxlDomainDestroy(ctx LibxlCtxPtr, domid uint32) int

int hyperxl_domain_destroy(libxl_ctx* ctx, uint32_t domid)

func HyperxlDomainStart

func HyperxlDomainStart(ctx LibxlCtxPtr, config *DomainConfig) (int, unsafe.Pointer, int)

int hyperxl_domain_start(libxl_ctx* ctx, hyperxl_domain_config* config);

func HyperxlNicAdd

func HyperxlNicAdd(ctx LibxlCtxPtr, domid uint32, ip, bridge, gatewaydev, ifname string, mac []byte) int

int hyperxl_nic_add(libxl_ctx* ctx, uint32_t domid, hyperxl_nic_config* config);

func HyperxlNicRemove

func HyperxlNicRemove(ctx LibxlCtxPtr, domid uint32, mac string) int

int hyperxl_nic_remove(libxl_ctx* ctx, uint32_t domid, const char* mac);

func HyperxlSigchldHandler

func HyperxlSigchldHandler(ctx LibxlCtxPtr)

void hyperxl_sigchld_handler(libxl_ctx* ctx)

func LibxlCtxFree

func LibxlCtxFree(ctx LibxlCtxPtr) int

int libxl_ctx_free(libxl_ctx *ctx /* 0 is OK */);

func XlStartDomain

func XlStartDomain(ctx LibxlCtxPtr, id string, boot *hypervisor.BootConfig, hyperSock, ttySock, consoleSock string, extra []string) (int, unsafe.Pointer, error)

Types

type DomainConfig

type DomainConfig struct {
	Hvm         bool
	Name        string
	Kernel      string
	Initrd      string
	Cmdline     string
	MaxVcpus    int
	MaxMemory   int
	ConsoleSock string
	Extra       []string
}

type HyperxlDiskConfig

type HyperxlDiskConfig C.struct_hyperxl_disk_config

type HyperxlDomainConfig

type HyperxlDomainConfig C.struct_hyperxl_domain_config

type HyperxlNicConfig

type HyperxlNicConfig C.struct_hyperxl_nic_config

type LibxlCtxPtr

type LibxlCtxPtr *C.struct_libxl__ctx

type LibxlDiskBackend

type LibxlDiskBackend C.enum_libxl_disk_backend

type LibxlDiskFormat

type LibxlDiskFormat C.enum_libxl_disk_format

type LibxlEvent

type LibxlEvent C.struct_libxl_event

type XenContext

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

func (*XenContext) AddDisk

func (xc *XenContext) AddDisk(ctx *hypervisor.VmContext, name, sourceType, filename, format string, id int)

func (*XenContext) AddNic

func (*XenContext) Associate

func (xc *XenContext) Associate(ctx *hypervisor.VmContext)

func (*XenContext) BuildinNetwork

func (xc *XenContext) BuildinNetwork() bool

func (*XenContext) Close

func (xc *XenContext) Close()

func (*XenContext) Dump

func (xc *XenContext) Dump() (map[string]interface{}, error)

func (*XenContext) Kill

func (xc *XenContext) Kill(ctx *hypervisor.VmContext)

func (*XenContext) Launch

func (xc *XenContext) Launch(ctx *hypervisor.VmContext)

func (*XenContext) RemoveDisk

func (xc *XenContext) RemoveDisk(ctx *hypervisor.VmContext, filename, format string, id int, callback hypervisor.VmEvent)

func (*XenContext) RemoveNic

func (xc *XenContext) RemoveNic(ctx *hypervisor.VmContext, device, mac string, callback hypervisor.VmEvent)

func (*XenContext) Shutdown

func (xc *XenContext) Shutdown(ctx *hypervisor.VmContext)

type XenDriver

type XenDriver struct {
	Ctx          LibxlCtxPtr
	Version      uint32
	Capabilities string
	Logger       *XentoollogLogger
	// contains filtered or unexported fields
}

func HyperxlInitializeDriver

func HyperxlInitializeDriver() (*XenDriver, int)

int hyperxl_initialize_driver(hyperxl_driver** pdriver);

func InitDriver

func InitDriver() *XenDriver

func (*XenDriver) InitContext

func (xd *XenDriver) InitContext(homeDir string) hypervisor.DriverContext

func (*XenDriver) Initialize

func (xd *XenDriver) Initialize() error

func (*XenDriver) LoadContext

func (xd *XenDriver) LoadContext(persisted map[string]interface{}) (hypervisor.DriverContext, error)

type XentoollogLogger

type XentoollogLogger C.struct_xentoollog_logger

Jump to

Keyboard shortcuts

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