summaryrefslogtreecommitdiff
path: root/argv.go
blob: 193e7798615a9fe5ffb007b14be28f42eb5b1a56 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
package main

/*
	this parses the command line arguements
	this enables command line options from other packages like 'gui' and 'log'
*/

import (
	"go.wit.com/dev/alexflint/arg"
)

var argv args

type args struct {
	Port      int    `arg:"--port"            default:"2520"  help:"port to run on"`
}

func (args) Version() string {
	return "virtigod " + Version
}

func init() {
	arg.MustParse(&argv)
}

func (a args) Description() string {
	return `
         this daemon talks to virtigo talks to libvirt and/or qemu

This sends data back to virtigo. It helps read out the libvirtxml
and convert it to protobuf.
The name is odd, it's virtigo-D not virti-god.

You can query the status directly:

	# the list of running vms:
	curl --silent http://localhost:2520/vms

	# information about libvirt domain for vm 'coriolis':
	curl --silent http://localhost:2520/dumpdomain?domain=coriolis
`
}