factory

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2017 License: Apache-2.0 Imports: 10 Imported by: 13

Documentation

Overview

package factory defines the full function factory interface package base defines the base factory interface package cache direct and template 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(bootConfig hypervisor.BootConfig, configs []FactoryConfig) Factory

func NewFromPolicy

func NewFromPolicy(bootConfig hypervisor.BootConfig, policy string) Factory

vmFactoryPolicy = [FactoryConfig,]*FactoryConfig FactoryConfig = {["cache":NUMBER,]["template":true|false,]"cpu":NUMBER,"memory":NUMBER}

type FactoryConfig

type FactoryConfig struct {
	Cache    int  `json:"cache"`
	Template bool `json:"template"`
	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