Skip to content

Commit b9b9a88

Browse files
committed
Use official go bindings for hyperkit.
1 parent 64ff2aa commit b9b9a88

File tree

422 files changed

+161651
-104
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

422 files changed

+161651
-104
lines changed

glide.lock

Lines changed: 13 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

glide.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ import:
1616
- package: github.com/zchee/libhyperkit
1717
- package: github.com/jceel/lib9p
1818
version: 7be3e0b914fbb2d2ecfe2984d02bacfd8e762eae
19+
- package: github.com/zchee/go-vmnet
20+
- package: github.com/moby/hyperkit
1921
testImport:
2022
- package: github.com/stretchr/testify
2123
version: v1.1.4

main.go

Lines changed: 1 addition & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -5,40 +5,10 @@
55
package main
66

77
import (
8-
"fmt"
9-
"os"
10-
118
"github.com/docker/machine/libmachine/drivers/plugin"
129
"github.com/zchee/docker-machine-driver-xhyve/xhyve"
13-
hyperkit "github.com/zchee/libhyperkit"
1410
)
1511

1612
func main() {
17-
if len(os.Args) >= 2 && os.Args[1] == "xhyve" {
18-
runXhyve()
19-
} else {
20-
plugin.RegisterDriver(xhyve.NewDriver("", ""))
21-
}
22-
}
23-
24-
func runXhyve() {
25-
done := make(chan bool)
26-
ptyCh := make(chan string)
27-
28-
args := os.Args[1:] // Technically we only need 2:, but a bug in hooklift/xhyve requires one arg in the beginning
29-
go func() {
30-
if err := hyperkit.Run(args, ptyCh); err != nil {
31-
fmt.Println(err)
32-
}
33-
done <- true
34-
}()
35-
36-
if os.Args[len(os.Args)-1] != "-M" {
37-
fmt.Printf("Waiting on a pseudo-terminal to be ready... ")
38-
pty := <-ptyCh
39-
fmt.Printf("done\n")
40-
fmt.Printf("Hook up your terminal emulator to %s in order to connect to your VM\n", pty)
41-
}
42-
43-
<-done
13+
plugin.RegisterDriver(xhyve.NewDriver("", ""))
4414
}

vendor/github.com/moby/hyperkit/.gitignore

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/moby/hyperkit/CODINGSTYLE.md

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/moby/hyperkit/CONTRIBUTING.md

Lines changed: 70 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/moby/hyperkit/MAINTAINERS

Lines changed: 77 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)