run

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2021 License: Apache-2.0 Imports: 42 Imported by: 2

Documentation

Index

Constants

View Source
const VMFilePathSeparator = ":"

VMFilePathSeparator separates VM name/ID from the path in the VM. Example: my-vm:/path/in/vm

Variables

This section is empty.

Functions

func Attach

func Attach(ao *AttachOptions) error

func CP added in v0.7.0

func CP(co *CpOptions) error

CP connects to a VM and copies files between the host and the VM based on the copy options.

func Create

func Create(co *CreateOptions) (err error)

func Exec added in v0.5.0

func Exec(eo *ExecOptions) error

Exec executes command in a VM based on the provided ExecOptions.

func Images

func Images(io *ImagesOptions) error

func ImportImage

func ImportImage(source string) (image *api.Image, err error)

func ImportKernel

func ImportKernel(source string) (kernel *api.Kernel, err error)

func Inspect added in v0.4.0

func Inspect(io *InspectOptions) error

Inspect renders the result of inspect in different formats based on the InspectOptions.

func Kernels

func Kernels(ko *KernelsOptions) error

func Logs

func Logs(lo *LogsOptions) error

func Ps

func Ps(po *PsOptions) error

Ps filters and renders the VMs based on the PsOptions.

func Rm

func Rm(ro *RmOptions) error

Rm removes VMs based on RmOptions.

func Rmi

func Rmi(ro *RmiOptions) error

func Rmk

func Rmk(ro *RmkOptions) error

func Run

func Run(ro *RunOptions, fs *flag.FlagSet) error

func SSH added in v0.3.0

func SSH(so *SshOptions) error

SSH starts a ssh session as per the provided ssh options.

func Start

func Start(so *StartOptions, fs *flag.FlagSet) error

func Stop

func Stop(so *StopOptions) error

Types

type AttachOptions

type AttachOptions struct {
	// contains filtered or unexported fields
}

checkRunning can be used to skip the running check, this is used by Start and Run as the in-container ignite takes some time to start up and update the state

func NewAttachOptions added in v0.3.0

func NewAttachOptions(vmMatch string) (ao *AttachOptions, err error)

type CPFlags added in v0.7.0

type CPFlags struct {
	Timeout      uint32
	IdentityFile string
}

CPFlags contains flags for the copy command.

func (*CPFlags) NewCPOptions added in v0.7.0

func (cf *CPFlags) NewCPOptions(source string, dest string) (co *CpOptions, err error)

NewCPOptions parses the command inputs and returns a copy option.

type CopyDirection added in v0.7.0

type CopyDirection int

CopyDirection is the direction of copy, from host to VM or VM to host.

const (
	CopyDirectionUnknown CopyDirection = iota
	CopyDirectionHostToVM
	CopyDirectionVMToHost
)

CopyDirection types.

type CpOptions added in v0.8.0

type CpOptions struct {
	*CPFlags
	// contains filtered or unexported fields
}

type CreateFlags added in v0.3.0

type CreateFlags struct {
	PortMappings []string
	CopyFiles    []string
	// This is a placeholder value here for now.
	// If it was set using flags, it will be copied over to
	// the API type. TODO: When we later have internal types
	// this can go away
	SSH         api.SSH
	ConfigFile  string
	VM          *api.VM
	Labels      []string
	RequireName bool
}

func NewCreateFlags added in v0.4.0

func NewCreateFlags() *CreateFlags

func (*CreateFlags) NewCreateOptions added in v0.3.0

func (cf *CreateFlags) NewCreateOptions(args []string, fs *flag.FlagSet) (*CreateOptions, error)

type CreateOptions

type CreateOptions struct {
	*CreateFlags
	// contains filtered or unexported fields
}

type ExecFlags added in v0.5.0

type ExecFlags struct {
	Timeout      uint32
	IdentityFile string
	Tty          bool
}

ExecFlags contains the flags supported by the exec command.

func (*ExecFlags) NewExecOptions added in v0.5.0

func (ef *ExecFlags) NewExecOptions(vmMatch string, command ...string) (eo *ExecOptions, err error)

NewExecOptions constructs and returns an ExecOptions.

type ExecOptions added in v0.8.0

type ExecOptions struct {
	*ExecFlags
	// contains filtered or unexported fields
}

type ImagesOptions

type ImagesOptions struct {
	// contains filtered or unexported fields
}

func NewImagesOptions added in v0.3.0

func NewImagesOptions() (io *ImagesOptions, err error)

type InspectFlags added in v0.4.0

type InspectFlags struct {
	OutputFormat   string
	TemplateFormat string
}

InspectFlags contains the flags supported by inspect.

func (*InspectFlags) NewInspectOptions added in v0.4.0

func (i *InspectFlags) NewInspectOptions(k, objectMatch string) (*InspectOptions, error)

NewInspectOptions constructs and returns InspectOptions with the given kind and object ID.

type InspectOptions added in v0.8.0

type InspectOptions struct {
	*InspectFlags
	// contains filtered or unexported fields
}

type KernelsOptions

type KernelsOptions struct {
	// contains filtered or unexported fields
}

func NewKernelsOptions added in v0.3.0

func NewKernelsOptions() (ko *KernelsOptions, err error)

type LogsOptions

type LogsOptions struct {
	// contains filtered or unexported fields
}

func NewLogsOptions added in v0.3.0

func NewLogsOptions(vmMatch string) (lo *LogsOptions, err error)

type PsFlags added in v0.3.0

type PsFlags struct {
	All            bool
	Filter         string
	TemplateFormat string
}

PsFlags contains the flags supported by ps.

func (*PsFlags) NewPsOptions added in v0.3.0

func (pf *PsFlags) NewPsOptions() (po *PsOptions, err error)

NewPsOptions constructs and returns PsOptions.

type PsOptions

type PsOptions struct {
	*PsFlags
	// contains filtered or unexported fields
}

type RmFlags added in v0.3.0

type RmFlags struct {
	Force      bool
	ConfigFile string
}

RmFlags contains the flags supported by the remove command.

func (*RmFlags) NewRmOptions added in v0.3.0

func (rf *RmFlags) NewRmOptions(vmMatches []string) (*RmOptions, error)

NewRmOptions creates and returns RmOptions with all the flags and VMs to be removed.

type RmOptions

type RmOptions struct {
	*RmFlags
	// contains filtered or unexported fields
}

type RmiFlags added in v0.3.0

type RmiFlags struct {
	Force bool
}

func (*RmiFlags) NewRmiOptions added in v0.3.0

func (rf *RmiFlags) NewRmiOptions(imageMatches []string) (*RmiOptions, error)

type RmiOptions

type RmiOptions struct {
	*RmiFlags
	// contains filtered or unexported fields
}

type RmkFlags added in v0.3.0

type RmkFlags struct {
	Force bool
}

func (*RmkFlags) NewRmkOptions added in v0.3.0

func (rf *RmkFlags) NewRmkOptions(kernelMatches []string) (*RmkOptions, error)

type RmkOptions

type RmkOptions struct {
	*RmkFlags
	// contains filtered or unexported fields
}

type RunFlags added in v0.3.0

type RunFlags struct {
	*CreateFlags
	*StartFlags
}

func (*RunFlags) NewRunOptions added in v0.3.0

func (rf *RunFlags) NewRunOptions(args []string, fs *flag.FlagSet) (*RunOptions, error)

type RunOptions

type RunOptions struct {
	*CreateOptions
	*StartOptions
}

type SSHFlags added in v0.3.0

type SSHFlags struct {
	Timeout      uint32
	IdentityFile string
	Tty          bool
}

SSHFlags contains the flags supported by the ssh command.

func (*SSHFlags) NewSSHOptions added in v0.3.0

func (sf *SSHFlags) NewSSHOptions(vmMatch string) (so *SshOptions, err error)

NewSSHOptions returns ssh options for a given VM.

type SshOptions added in v0.8.0

type SshOptions struct {
	*SSHFlags
	// contains filtered or unexported fields
}

type StartFlags added in v0.3.0

type StartFlags struct {
	Interactive            bool
	Debug                  bool
	IgnoredPreflightErrors []string
}

func (*StartFlags) NewStartOptions added in v0.3.0

func (sf *StartFlags) NewStartOptions(vmMatch string) (*StartOptions, error)

type StartOptions

type StartOptions struct {
	*StartFlags
	*AttachOptions
}

type StopFlags added in v0.3.0

type StopFlags struct {
	Kill bool
}

func (*StopFlags) NewStopOptions added in v0.3.0

func (sf *StopFlags) NewStopOptions(vmMatches []string) (so *StopOptions, err error)

type StopOptions

type StopOptions struct {
	*StopFlags
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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