factory

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: May 25, 2016 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

package factory defines the full function factory interface package base defines the base factory interface package cache and direct implement base.Factory package single and multi implement fatory.Factory

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Factory

type Factory interface {
	GetVm(cpu, mem int) (*hypervisor.Vm, error)
	CloseFactory()
}

func NewFromConfigs

func NewFromConfigs(kernel, initrd string, configs []FactoryConfig) Factory

func NewFromPolicy

func NewFromPolicy(kernel, initrd string, policy string) Factory

vmFactoryPolicy = [FactoryConfig,]*FactoryConfig FactoryConfig = {["cache":NUMBER,]"cpu":NUMBER,"memory":NUMBER}

type FactoryConfig

type FactoryConfig struct {
	Cache  int `json:"cache"`
	Cpu    int `json:"cpu"`
	Memory int `json:"memory"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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