keep removing old junk

Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
Jeff Carr 2024-10-23 00:54:37 -05:00
parent 62d406e0de
commit 889e7bb259
3 changed files with 40 additions and 41 deletions

View File

@ -7,8 +7,7 @@ REDOMOD = $(shell if [ -e go.sum ]; then echo go.sum exists; else GO111MODULE=
all:
GO111MODULE=off go build -v -ldflags "-X main.Version=${VERSION} -X gui.GUIVERSION=${VERSION}"
./virtigo --version
# ./virtigo --hosts farm01 farm02 farm03
./virtigo --start jcarr
./virtigo
start-all-droplets:
curl --silent http://localhost:8080/start?start=git.wit.org

View File

@ -11,11 +11,11 @@ import "go.wit.com/log"
var argv args
type args struct {
Dir string `arg:"--dir" help:"defaults to ~/.config/virtigo/"`
Port int `arg:"--port" default:"8080" help:"specify a different default port"`
Hosts []string `arg:"--hosts" help:"hosts to connect to"`
Uptime bool `arg:"--uptime" default:"true" help:"allow uptime checks for things like Kuma"`
Port int `arg:"--port" default:"8080" help:"specify a different default port"`
Daemon bool `arg:"--daemon" help:"run in daemon mode"`
Start string `arg:"--start" help:"droplet to start"`
}
func (a args) Description() string {

26
main.go
View File

@ -57,10 +57,20 @@ func main() {
}
*/
if argv.Start != "" {
d := findDroplet(argv.Start)
// start the watchdog polling for each hypervisor
for _, h := range me.hypers {
log.Info("starting polling on", h.pb.Hostname)
go h.NewWatchdog()
}
// sit here
startHTTP()
}
func makeDroplet(start string) {
d := findDroplet(start)
if d == nil {
log.Info("droplet is unknown:", argv.Start)
log.Info("droplet is unknown:", start)
os.Exit(0)
}
log.Info("start droplet here:", d.pb.Hostname)
@ -92,14 +102,4 @@ func main() {
writeoutXml(domcfg, "blahcarr")
os.Exit(0)
}
// start the watchdog polling for each hypervisor
for _, h := range me.hypers {
log.Info("starting polling on", h.pb.Hostname)
go h.NewWatchdog()
}
// sit here
startHTTP()
}