base

package
v0.116.0 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Box

type Box struct {
	CPU      string
	Mem      string
	DiskSize string
	MACAddr  string
}

type Hypervisor

type Hypervisor interface {
	Start(vmName string) error

	Commit(vmName, imageName string) error

	Create(imageName, vmName string, cpus int, mem int) error

	List(all bool, excludeFunc func(vmName string) bool) ([]string, error)

	Stop(vmName string) error

	Remove(vmName string) error

	Modify(vmName string, cpus int, mem int) error

	ShowGUI(vmName string) error

	AddMount(vmName, ipAddr, hostPath, guestPath string) error

	RemoveMounts(vmName, ipAddr string) error

	ListMounts(vmName, ipAddr string) ([]MountPath, error)

	SetNetworkAdapterAsBridge(vmName string) error

	GetBoxInfo(vmName string) (*Box, error)

	GetSubnet() (*Subnet, error)
}

type MountPath

type MountPath struct {
	HostPath  string
	GuestPath string
}

type Subnet added in v0.113.0

type Subnet struct {
	Len int // length of ips in the subnet
	// contains filtered or unexported fields
}

func NewSubnet added in v0.113.0

func NewSubnet(anIp, netmask string) (*Subnet, error)

anIp is some ip inside the subnet

func (*Subnet) HasNext added in v0.113.0

func (c *Subnet) HasNext() bool

func (*Subnet) IP added in v0.113.0

func (c *Subnet) IP() string

func (*Subnet) Next added in v0.113.0

func (c *Subnet) Next() *Subnet

Jump to

Keyboard shortcuts

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