action

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2025 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Action

type Action func(context.Context, *lxc.Client) error

func Chain

func Chain(actions ...Action) Action

Chain is a meta Action that runs multiple Action one after the other.

func CopyInstanceFile

func CopyInstanceFile(name string, instanceFile string, outputFile string) Action

CopyInstanceFile is an Action that copies the contents of an instance file on the local disk.

func DeleteInstance

func DeleteInstance(name string) Action

DeleteInstance is an Action that deletes the instance with specified name.

func ExecInstance

func ExecInstance(name string, bashScript string, args ...string) Action

ExecInstance is an Action that executes a bash script on the instance, with an optional list of arguments.

func ExportImage

func ExportImage(imageAliasName string, outputFile string) Action

ExportImage is an Action that downloads a unified image tarball and saves to a local file.

func LaunchInstance

func LaunchInstance(name string, launchOpts *lxc.LaunchOptions) Action

LaunchInstance is an Action that launches an instance and waits for its agent to come up.

func PublishImage

func PublishImage(instanceName string, imageAliasName string, info PublishImageInfo) Action

PublishImage is an Action that publishes an image from an existing instance.

func StopInstance

func StopInstance(name string) Action

StopInstance is an Action that stops the instance with specified name.

func Wait

func Wait(duration time.Duration) Action

Wait is an Action that blocks for the specified amount of time.

type PublishImageInfo

type PublishImageInfo struct {
	Name            string
	OperatingSystem string
	Release         string
	Variant         string

	LXCRequireCgroupv2 bool
}

Jump to

Keyboard shortcuts

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