diff options
Diffstat (limited to 'main.go')
| -rw-r--r-- | main.go | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -26,7 +26,6 @@ import ( ) var Version string -var hv *hypervisor.Hypervisor //go:embed resources/* var resources embed.FS @@ -46,15 +45,15 @@ func main() { // fmt.Printf("\nConnecting to %s://%s\n", *network, *address) newConn := func() (net.Conn, error) { + // return net.DialTimeout("tcp", "hyper02:16514", *timeout) // return net.DialTimeout(*network, *address, *timeout) return net.DialTimeout("unix", "/var/run/libvirt/libvirt-sock", 2*time.Second) - // return net.DialTimeout("tcp", "farm02:16514", *timeout) } driver := hypervisor.NewRPCDriver(newConn) - hv = hypervisor.New(driver) + me.hv = hypervisor.New(driver) - pollHypervisor(hv) + pollHypervisor(me.hv) startHTTP() } |
