instance

package
v0.23.0 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2024 License: Apache-2.0 Imports: 29 Imported by: 1

Documentation

Index

Constants

View Source
const DefaultWatchHostAgentEventsTimeout = 10 * time.Minute

DefaultWatchHostAgentEventsTimeout is the duration to wait for the instance to be running before timing out.

Variables

View Source
var SysProcAttr = &syscall.SysProcAttr{}

Functions

func Create

func Create(ctx context.Context, instName string, yBytes []byte, saveBrokenYAML bool) (*store.Instance, error)

func Delete

func Delete(ctx context.Context, inst *store.Instance, force bool) error

func LimactlShellCmd

func LimactlShellCmd(instName string) string

func ShowMessage

func ShowMessage(inst *store.Instance) error

func Start

func Start(ctx context.Context, inst *store.Instance, launchHostAgentForeground bool) error

Start starts the instance. Start calls Prepare by itself, so you do not need to call Prepare manually before calling Start.

func StopForcibly

func StopForcibly(inst *store.Instance)

func StopGracefully

func StopGracefully(inst *store.Instance) error

func WithWatchHostAgentTimeout

func WithWatchHostAgentTimeout(ctx context.Context, timeout time.Duration) context.Context

WithWatchHostAgentTimeout sets the value of the timeout to use for watchHostAgentEvents in the given Context.

Types

type Prepared

type Prepared struct {
	Driver              driver.Driver
	NerdctlArchiveCache string
}

func Prepare

func Prepare(ctx context.Context, inst *store.Instance) (*Prepared, error)

Prepare ensures the disk, the nerdctl archive, etc.

Jump to

Keyboard shortcuts

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