types

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2024 License: MIT Imports: 12 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 StateTerminating = MachineState{"Terminating"}
View Source
var StateUnknown = MachineState{"Unknown"}

Functions

func Exists added in v0.2.4

func Exists(path string) (bool, error)

Types

type Environment

type Environment interface {
	Name() string
	VMs() []VM
	Platform() Platform
	StartVM(string) error
	StopVM(string) error
	RestartVM(string) error
}

type Machine

type Machine struct {
	InstanceName       string
	InstanceID         string
	CurrentUpTime      time.Duration
	PublicIPAddresses  []string
	PrivateIPAddresses []string
	CurrentState       MachineState
	Env                Environment
}

func (Machine) Environment

func (m Machine) Environment() Environment

func (Machine) ExecSSH

func (m Machine) ExecSSH(user string, additionalArgs ...string) error

func (Machine) ID

func (m Machine) ID() string

func (Machine) IPAddress

func (m Machine) IPAddress() string

func (Machine) Name

func (m Machine) Name() string

func (Machine) NewSSHSession added in v0.2.4

func (m Machine) NewSSHSession(user string) (*ssh_util.Session, error)

func (Machine) Restart

func (m Machine) Restart() error

func (Machine) Start

func (m Machine) Start() error

func (Machine) StartVNC added in v0.2.4

func (m Machine) StartVNC(user string) error

func (Machine) State

func (m Machine) State() string

func (Machine) Stop

func (m Machine) Stop() error

type MachineState

type MachineState struct{ Name string }

type Platform

type Platform interface {
	Environments(validNames ...string) []Environment
	Name() string
	Provider() Provider
}

type Provider

type Provider interface {
	Platforms(validNames ...string) []Platform
	Name() string
	IsAvailable() bool
}

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(string) 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