Documentation ¶
Index ¶
- func DefaultContainerOpt() mpb.ContainerOption
- func DefaultProgressFormat(p *mpb.Progress) virter.ProgressOpt
- func Execute()
- func GetLocalImage(ctx context.Context, imageName string, source string, v *virter.Virter, ...) (*virter.LocalImage, error)
- func InitVirter() (*virter.Virter, error)
- func LocalImageName(img string) string
- type DiskArg
- type MountArg
- type NICArg
- type SSHClientBuilder
- type ShortFormatter
- type Size
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultContainerOpt ¶ added in v0.14.2
func DefaultContainerOpt() mpb.ContainerOption
func DefaultProgressFormat ¶ added in v0.14.0
func DefaultProgressFormat(p *mpb.Progress) virter.ProgressOpt
func Execute ¶
func Execute()
Execute adds all child commands to the root command and sets flags appropriately
func GetLocalImage ¶ added in v0.14.0
func GetLocalImage(ctx context.Context, imageName string, source string, v *virter.Virter, policy pullpolicy.PullPolicy, p virter.ProgressOpt) (*virter.LocalImage, error)
GetLocalImage tries to find the image in local storage.
If the image, given by the imageName is not found in local storage, it is pulled from source. Image names are resolved according to LocalImageName. It is possible to specify: * A local image name. * A name matching an alias in the legacy image registry. * A container registry reference, which will be converted into a compatible local volume name.
func InitVirter ¶ added in v0.9.0
InitVirter initializes virter by connecting to the local libvirt instance and configures the ssh keystore.
func LocalImageName ¶ added in v0.14.0
LocalImageName returns the local name for the user-supplied image name.
If supplied with an image name without any registry location, this just returns the original string.
If supplied with an image name with registry location (the registry.example.com in registry.example.com/image:foo), the registry information will be stripped. "/" and ":" will be replaced by "-".
Examples: * local-image -> local-image * image:foo -> image:foo * registry.example.com/image:foo -> image-foo * registry.example.com/namespace/image -> namespace--image-latest
Types ¶
type DiskArg ¶ added in v0.2.0
type DiskArg struct { Name string `arg:"name"` Size Size `arg:"size"` Format string `arg:"format,qcow2"` Bus string `arg:"bus,virtio"` }
DiskArg represents a disk that can be passed to virter via a command line argument.
func (*DiskArg) GetSizeKiB ¶ added in v0.2.0
type MountArg ¶ added in v0.15.0
func (*MountArg) GetHostPath ¶ added in v0.15.0
type NICArg ¶ added in v0.11.0
type SSHClientBuilder ¶
type SSHClientBuilder struct { }
SSHClientBuilder builds SSH shell clients
func (SSHClientBuilder) NewShellClient ¶
func (SSHClientBuilder) NewShellClient(hostPort string, sshConfig ssh.ClientConfig) virter.ShellClient
NewShellClient returns an SSH shell client
type ShortFormatter ¶ added in v0.21.0
type ShortFormatter struct {
LevelDesc []string
}
Source Files ¶
- config.go
- disk.go
- image.go
- image_build.go
- image_load.go
- image_ls.go
- image_prune.go
- image_pull.go
- image_push.go
- image_rm.go
- image_save.go
- mount.go
- network.go
- network_add.go
- network_host.go
- network_host_add.go
- network_host_rm.go
- network_list_attached.go
- network_ls.go
- network_rm.go
- nic.go
- registry.go
- registry_update.go
- root.go
- version.go
- virter.go
- vm.go
- vm_commit.go
- vm_cp.go
- vm_exec.go
- vm_exists.go
- vm_hostkey.go
- vm_rm.go
- vm_run.go
- vm_ssh.go