summaryrefslogtreecommitdiff
path: root/pkg/machine/config.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/machine/config.go')
-rw-r--r--pkg/machine/config.go16
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
}