vm

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2018 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AgentEnvService

type AgentEnvService interface {
	// Fetch will return an error if Update was not called beforehand
	Fetch() (apiv1.AgentEnv, error)
	Update(apiv1.AgentEnv) error
}

func NewFSAgentEnvService

func NewFSAgentEnvService(fileService FileService, logger boshlog.Logger) AgentEnvService

type Container

type Container struct {
	// contains filtered or unexported fields
}

func NewContainer

func NewContainer(
	id apiv1.VMCID,
	dkrClient *dkrclient.Client,
	agentEnvService AgentEnvService,
	logger boshlog.Logger,
) Container

func (Container) AttachDisk

func (c Container) AttachDisk(disk bdisk.Disk) error

func (Container) Delete

func (c Container) Delete() error

func (Container) DetachDisk

func (c Container) DetachDisk(disk bdisk.Disk) error

func (Container) Exists

func (c Container) Exists() (bool, error)

func (Container) ID

func (c Container) ID() apiv1.VMCID

type Creator

type Creator interface {
	Create(apiv1.AgentID, bstem.Stemcell, apiv1.VMCloudProps,
		apiv1.Networks, []apiv1.DiskCID, apiv1.VMEnv) (VM, error)
}

type EphemeralDiskCID added in v0.0.5

type EphemeralDiskCID struct {
	// contains filtered or unexported fields
}

func (EphemeralDiskCID) AsString added in v0.0.5

func (c EphemeralDiskCID) AsString() string

type Factory

type Factory struct {
	// contains filtered or unexported fields
}

func NewFactory

func NewFactory(
	dkrClient *dkrclient.Client,
	uuidGen boshuuid.Generator,
	agentOptions apiv1.AgentOptions,
	logger boshlog.Logger,
) Factory

func (Factory) Create

func (f Factory) Create(agentID apiv1.AgentID, stemcell bstem.Stemcell,
	cloudProps apiv1.VMCloudProps, networks apiv1.Networks,
	diskCIDs []apiv1.DiskCID, env apiv1.VMEnv) (VM, error)

func (Factory) Find

func (f Factory) Find(id apiv1.VMCID) (VM, error)

type FileService

type FileService interface {
	Upload(string, []byte) error
	Download(string) ([]byte, error)
}

func NewFileService

func NewFileService(
	dkrClient *dkrclient.Client,
	vmCID apiv1.VMCID,
	logger boshlog.Logger,
) FileService

type Finder

type Finder interface {
	Find(apiv1.VMCID) (VM, error)
}

type NetProps

type NetProps struct {
	Name   string
	Driver string

	EnableIPv6 bool `json:"enable_ipv6"` // useful for dynamic networks since they dont specify subnet
}

type Networks added in v0.0.3

type Networks struct {
	// contains filtered or unexported fields
}

func NewNetworks added in v0.0.3

func NewNetworks(
	dkrClient *dkrclient.Client,
	uuidGen boshuuid.Generator,
	networks apiv1.Networks,
) Networks

func (Networks) Enable added in v0.0.3

func (n Networks) Enable() (string, *dkrnet.NetworkingConfig, error)

type VM

type VM interface {
	ID() apiv1.VMCID

	Delete() error
	Exists() (bool, error)

	AttachDisk(bdisk.Disk) error
	DetachDisk(bdisk.Disk) error
}

type VMProps

type VMProps struct {
	ExposedPorts []string `json:"ports"` // [6868/tcp]

	// Allow all Docker options
	// ./src/github.com/docker/engine-api/types/container/host_config.go
	dkrcont.HostConfig `json:",inline"`
}

Jump to

Keyboard shortcuts

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