types

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var StateOff = MachineState{"Off"}
View Source
var StateRunning = MachineState{"Running"}
View Source
var StateSleeping = MachineState{"Sleeping"}
View Source
var StateStarting = MachineState{"Starting"}
View Source
var StateStopping = MachineState{"Stopping"}
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
	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() 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) Restart

func (m Machine) Restart() error

func (Machine) Start

func (m Machine) Start() 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() error
}

Jump to

Keyboard shortcuts

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