diff options
author | Jason T. Greene <jason@stacksmash.com> | 2021-11-12 00:10:58 -0600 |
---|---|---|
committer | Jason T. Greene <jason.greene@redhat.com> | 2021-12-24 19:28:10 -0600 |
commit | 803defbe509af1902a1fdc2ed7f41b49ebd241f6 (patch) | |
tree | 54fe3a08b58b9129f87e51cd1b8fcd938f582777 /pkg/machine/config.go | |
parent | 73a54ea54d0a1b4ccaa2a0e23c678e5b7c1d5c37 (diff) | |
download | podman-803defbe509af1902a1fdc2ed7f41b49ebd241f6.tar.gz podman-803defbe509af1902a1fdc2ed7f41b49ebd241f6.tar.bz2 podman-803defbe509af1902a1fdc2ed7f41b49ebd241f6.zip |
Introduce Windows WSL implementation of podman machine
[NO NEW TESTS NEEDED] for now
Signed-off-by: Jason Greene <jason.greene@redhat.com>
Diffstat (limited to 'pkg/machine/config.go')
-rw-r--r-- | pkg/machine/config.go | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/pkg/machine/config.go b/pkg/machine/config.go index e5e701303..4f2947ac0 100644 --- a/pkg/machine/config.go +++ b/pkg/machine/config.go @@ -1,4 +1,4 @@ -// +build amd64,!windows arm64,!windows +// +build amd64 arm64 package machine @@ -24,6 +24,15 @@ type InitOptions struct { TimeZone string URI url.URL Username string + ReExec bool +} + +type Provider interface { + NewMachine(opts InitOptions) (VM, error) + LoadVMByName(name string) (VM, error) + List(opts ListOptions) ([]*ListResponse, error) + IsValidVMName(name string) (bool, error) + CheckExclusiveActiveVM() (bool, string, error) } type RemoteConnectionType string @@ -49,6 +58,7 @@ type Download struct { Sha256sum string URL *url.URL VMName string + Size int64 } type ListOptions struct{} @@ -81,7 +91,7 @@ type RemoveOptions struct { } type VM interface { - Init(opts InitOptions) error + Init(opts InitOptions) (bool, error) Remove(name string, opts RemoveOptions) (string, func() error, error) SSH(name string, opts SSHOptions) error Start(name string, opts StartOptions) error @@ -89,7 +99,7 @@ type VM interface { } type DistributionDownload interface { - DownloadImage() error + HasUsableCache() (bool, error) Get() *Download } |