vm

package
v5.2.2+incompatible Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2018 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Clock added in v0.0.144

type Clock interface {
	Sleep(time.Duration)
	Now() time.Time
}

type DiskDeployer

type DiskDeployer interface {
	Deploy(diskPool bideplmanifest.DiskPool, cloud bicloud.Cloud, vm VM, eventLoggerStage biui.Stage) ([]bidisk.Disk, error)
}

DiskDeployer is in the vm package to avoid a [disk -> vm -> disk] dependency cycle

func NewDiskDeployer

func NewDiskDeployer(diskManagerFactory bidisk.ManagerFactory, diskRepo biconfig.DiskRepo, logger boshlog.Logger, recreatePersistentDisk bool) DiskDeployer

type Manager

type Manager interface {
	FindCurrent() (VM, bool, error)
	Create(bistemcell.CloudStemcell, bideplmanifest.Manifest) (VM, error)
}

func NewManager

func NewManager(
	vmRepo biconfig.VMRepo,
	stemcellRepo biconfig.StemcellRepo,
	diskDeployer DiskDeployer,
	agentClient biagentclient.AgentClient,
	cloud bicloud.Cloud,
	uuidGenerator boshuuid.Generator,
	fs boshsys.FileSystem,
	logger boshlog.Logger,
	timeService Clock,
) Manager

type ManagerFactory

type ManagerFactory interface {
	NewManager(cloud bicloud.Cloud, agentClient biagentclient.AgentClient) Manager
}

func NewManagerFactory

func NewManagerFactory(
	vmRepo biconfig.VMRepo,
	stemcellRepo biconfig.StemcellRepo,
	diskDeployer DiskDeployer,
	uuidGenerator boshuuid.Generator,
	fs boshsys.FileSystem,
	logger boshlog.Logger,
) ManagerFactory

type VM

type VM interface {
	CID() string
	Exists() (bool, error)
	AgentClient() biagentclient.AgentClient
	WaitUntilReady(timeout time.Duration, delay time.Duration) error
	Start() error
	Stop() error
	Apply(bias.ApplySpec) error
	UpdateDisks(bideplmanifest.DiskPool, biui.Stage) ([]bidisk.Disk, error)
	WaitToBeRunning(maxAttempts int, delay time.Duration) error
	AttachDisk(bidisk.Disk) error
	DetachDisk(bidisk.Disk) error
	Disks() ([]bidisk.Disk, error)
	UnmountDisk(bidisk.Disk) error
	MigrateDisk() error
	RunScript(script string, options map[string]interface{}) error
	Delete() error
	GetState() (biagentclient.AgentState, error)
}

func NewVM

func NewVM(
	cid string,
	vmRepo biconfig.VMRepo,
	stemcellRepo biconfig.StemcellRepo,
	diskDeployer DiskDeployer,
	agentClient biagentclient.AgentClient,
	cloud bicloud.Cloud,
	timeService Clock,
	fs boshsys.FileSystem,
	logger boshlog.Logger,
) VM

func NewVMWithMetadata

func NewVMWithMetadata(
	cid string,
	vmRepo biconfig.VMRepo,
	stemcellRepo biconfig.StemcellRepo,
	diskDeployer DiskDeployer,
	agentClient biagentclient.AgentClient,
	cloud bicloud.Cloud,
	timeService Clock,
	fs boshsys.FileSystem,
	logger boshlog.Logger,
	metadata bicloud.VMMetadata,
) VM

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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