devpod

package
v0.0.15 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2024 License: MPL-2.0 Imports: 12 Imported by: 0

README

DevPod commands package

Implement the necessary commands that DevPod need to interact with the provider.

Used by the Cobra commands package.

Documentation

Index

Constants

View Source
const (
	RUNNING  = "Running"
	STOPPED  = "Stopped"
	NOTFOUND = "NotFound"
	BUSY     = "Busy"
)
View Source
const (
	MULTIPASS_PATH      = "MULTIPASS_PATH"
	MULTIPASS_IMAGE     = "MULTIPASS_IMAGE"
	MULTIPASS_CPUS      = "MULTIPASS_CPUS"
	MULTIPASS_DISK_SIZE = "MULTIPASS_DISK_SIZE"
	MULTIPASS_MEMORY    = "MULTIPASS_MEMORY"
	MULTIPASS_MOUNTS    = "MULTIPASS_MOUNTS"
)

Variables

This section is empty.

Functions

func Command

func Command() error

devpod uses this to inject itself into the environment and route all communication through the commands standard output and input.

func Create

func Create() error

devpod calls this to create the multipass instance

func Delete

func Delete() error

devpod calls this to delete the multipass instance

func Init

func Init() error

devpod calls this when the provider is being added, here we are just invoking the 'multipass version' command as a way to ensure that multipass is reachable

func Start

func Start() error

devpod calls this to start the multipass instance

func Status

func Status() error

devpod calls this to get the status of the multipass instance and expect the response to be returned via stdout

func Stop

func Stop() error

devpod calls this to stop the multipass instance

Types

type Options

type Options struct {
	Path     string // Path to multipass executable
	Image    string // --image arg passed into multipass launch command
	Cpus     int    // --cpus arg passed into multipass launch command
	DiskSize string // --disk arg passed into multipass launch command
	Memory   string // --memory arg passed into multipass launch command
	Mounts   string // host to multipass instance mounts
}

func OptsFromEnv

func OptsFromEnv() (*Options, error)

Jump to

Keyboard shortcuts

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