Documentation ¶
Index ¶
- Constants
- func Attach(ao *AttachOptions) error
- func CP(co *CpOptions) error
- func Create(co *CreateOptions) (err error)
- func Exec(eo *ExecOptions) error
- func Images(io *ImagesOptions) error
- func ImportImage(source string) (image *api.Image, err error)
- func ImportKernel(source string) (kernel *api.Kernel, err error)
- func Inspect(io *InspectOptions) error
- func Kernels(ko *KernelsOptions) error
- func Logs(lo *LogsOptions) error
- func Ps(po *PsOptions) error
- func Rm(ro *RmOptions) error
- func Rmi(ro *RmiOptions) error
- func Rmk(ro *RmkOptions) error
- func Run(ro *RunOptions, fs *flag.FlagSet) error
- func SSH(so *SshOptions) error
- func Start(so *StartOptions, fs *flag.FlagSet) error
- func Stop(so *StopOptions) error
- type AttachOptions
- type CPFlags
- type CopyDirection
- type CpOptions
- type CreateFlags
- type CreateOptions
- type ExecFlags
- type ExecOptions
- type ImagesOptions
- type InspectFlags
- type InspectOptions
- type KernelsOptions
- type LogsOptions
- type PsFlags
- type PsOptions
- type RmFlags
- type RmOptions
- type RmiFlags
- type RmiOptions
- type RmkFlags
- type RmkOptions
- type RunFlags
- type RunOptions
- type SSHFlags
- type SshOptions
- type StartFlags
- type StartOptions
- type StopFlags
- type StopOptions
Constants ¶
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
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 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 Rmi ¶
func Rmi(ro *RmiOptions) error
func Rmk ¶
func Rmk(ro *RmkOptions) 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 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 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
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
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
PsFlags contains the flags supported by ps.
func (*PsFlags) NewPsOptions ¶ added in v0.3.0
NewPsOptions constructs and returns PsOptions.
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
type RunOptions ¶
type RunOptions struct { *CreateOptions *StartOptions }
type SSHFlags ¶ added in v0.3.0
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
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 }