server

package
v0.7.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2016 License: Apache-2.0 Imports: 44 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Raw
	Tap
	HDD      = "HDD"
	CDROM    = "CDROM"
	Local    = "localfs"
	Remote   = "URL"
	Attached = true
	Detached = false
)

Variables

View Source
var ServerTimeout = 25 * time.Second

Functions

func HandleVPNtunnels

func HandleVPNtunnels() (f func(), err error)

func PullImage

func PullImage(channel, version string,
	override, preferLocal bool) (v string, err error)

PullImage ...

func Start

func Start() (err error)

Start server...

Types

type Config

type Config struct {
	sync.Mutex
	Meta      *release.Info
	Media     MediaAssets
	Active    map[string]*VMInfo
	APIserver *manners.GracefulServer
	Jobs      sync.WaitGroup
}

Config ...

var Daemon *Config

func New

func New() *Config

New ...

func (*Config) Running

func (cfg *Config) Running() (i *release.Info, err error)

type MediaAssets

type MediaAssets map[string]semver.Versions

MediaAssets ...

type NetworkInterface

type NetworkInterface struct {
	Type int
	// if/when tap...
	Path string `json:",omitempty"`
}

NetworkInterface ...

type RPCquery

type RPCquery struct {
	Input []string
	VM    *VMInfo
}

type RPCreply

type RPCreply struct {
	Output  []string
	Meta    *release.Info
	VM      *VMInfo
	Images  map[string]semver.Versions
	Running map[string]*VMInfo
}

func RPCQuery

func RPCQuery(f string, args *RPCquery) (reply *RPCreply, err error)

type RPCservice

type RPCservice struct{}

func (*RPCservice) ActiveVMs

func (s *RPCservice) ActiveVMs(r *http.Request,
	args *RPCquery, reply *RPCreply) (err error)

func (*RPCservice) AvailableImages

func (s *RPCservice) AvailableImages(r *http.Request,
	args *RPCquery, reply *RPCreply) (err error)

func (*RPCservice) Echo

func (s *RPCservice) Echo(r *http.Request,
	args *RPCquery, reply *RPCreply) (err error)

func (*RPCservice) RemoveImage

func (s *RPCservice) RemoveImage(r *http.Request,
	args *RPCquery, reply *RPCreply) (err error)

func (*RPCservice) Run

func (s *RPCservice) Run(r *http.Request,
	args *RPCquery, reply *RPCreply) (err error)

func (*RPCservice) Stop

func (s *RPCservice) Stop(r *http.Request,
	args *RPCquery, reply *RPCreply) (err error)

func (*RPCservice) StopVMs

func (s *RPCservice) StopVMs(r *http.Request,
	args *RPCquery, reply *RPCreply) (err error)

func (*RPCservice) UUIDtoMACaddr

func (s *RPCservice) UUIDtoMACaddr(r *http.Request,
	args *RPCquery, reply *RPCreply) (err error)

type StorageAssets

type StorageAssets struct {
	CDDrives, HardDrives map[string]StorageDevice `json:",omitempty"`
}

StorageAssets ...

func (*StorageAssets) PrettyPrint

func (volumes *StorageAssets) PrettyPrint(root int)

type StorageDevice

type StorageDevice struct {
	Slot       int
	Type, Path string
}

StorageDevice ...

type VMInfo

type VMInfo struct {
	Name, Channel, Version, UUID            string
	MacAddress, PublicIP                    string
	InternalSSHkey, InternalSSHprivate      string
	Cpus, Memory, Pid, Root                 int
	SSHkey, CloudConfig, CClocation         string `json:",omitempty"`
	AddToHypervisor, AddToKernel            string `json:",omitempty"`
	Ethernet                                []NetworkInterface
	Storage                                 StorageAssets `json:",omitempty"`
	SharedHomedir, OfflineMode, NotIsolated bool
	CreationTime                            time.Time
	// contains filtered or unexported fields
}

VMInfo - per VM settings

func (*VMInfo) Log

func (vm *VMInfo) Log() string

func (*VMInfo) MkRunDir

func (vm *VMInfo) MkRunDir() error

func (*VMInfo) PrettyPrint

func (vm *VMInfo) PrettyPrint()

func (*VMInfo) RunDir

func (vm *VMInfo) RunDir() string

func (*VMInfo) SSHkeyGen

func (vm *VMInfo) SSHkeyGen() (err error)

SSHkeyGen creates a one-time ssh public and private key pair

func (*VMInfo) TTY

func (vm *VMInfo) TTY() string

func (*VMInfo) ValidateCDROM

func (vm *VMInfo) ValidateCDROM(path string) (err error)

ValidateCDROM ...

func (*VMInfo) ValidateCloudConfig

func (vm *VMInfo) ValidateCloudConfig(config string) (err error)

ValidateCloudConfig ...

func (*VMInfo) ValidateVolumes

func (vm *VMInfo) ValidateVolumes(volumes []string, root bool) (err error)

ValidateVolumes ...

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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