types

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var StateRunning = MachineState{"Running"}
View Source
var StateSleeping = MachineState{"Sleeping"}
View Source
var StateStarting = MachineState{"Starting"}
View Source
var StateStopped = MachineState{"Stopped"}
View Source
var StateStopping = MachineState{"Stopping"}
View Source
var StateTerminated = MachineState{"Terminated"}
View Source
var StateTerminating = MachineState{"Terminating"}
View Source
var StateUnknown = MachineState{"Unknown"}

Functions

This section is empty.

Types

type Environment

type Environment interface {
	Name() string
	VMs() []VM
	Profile() Profile
	StartVM(string) error
	StopVM(string) error
	RestartVM(string) error
	ImageBuilds() ([]ImageBuild, error)
	Images() ([]Image, error)
	CreateVM(MachineLaunchOptions) error
	DestroyVM(string) error
}

type Image added in v0.3.0

type Image interface {
	Name() string
	Environment() Environment
	Launch() error
}

type ImageBuild added in v0.3.0

type ImageBuild interface {
	Name() string
	ProviderType() string
	Provisioner() string
	Build() error
}

type MachineLaunchOptions added in v0.3.0

type MachineLaunchOptions struct {
	CloudInitTpl string      `json:"cloud-init"`
	Image        types.Image `json:"image"`
}

type MachineState

type MachineState struct {
	Name string `json:"name"`
}

type Profile added in v0.3.0

type Profile interface {
	Environments() []Environment
	Name() string
	Provider() Provider
	SetConfig(config common.ProfileConfig)
	GetConfig() common.ProfileConfig
}

type Provider

type Provider interface {
	Profiles() []Profile
	Name() string
	Type() string
	IsAvailable() bool
	SetConfig(config common.ProviderConfig)
	GetConfig() common.ProviderConfig
}

type VM

type VM interface {
	Name() string
	ID() string
	IPAddress() string
	State() string
	Start() error
	Stop() error
	Restart() error
	Environment() Environment
	ExecSSH(string, ...string) error
	StartVNC(user string, killVNC bool) error
	NewSSHSession(string) (*ssh_util.Session, error)
}

Jump to

Keyboard shortcuts

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