diff options
| author | Jeff Carr <[email protected]> | 2024-10-12 10:59:11 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-10-12 10:59:11 -0500 |
| commit | d08d9f99bee4d4e93a8beda780d8e9f6099e32cb (patch) | |
| tree | 78540be4d3b371569f59ee863621b03786a479c5 /structs.go | |
| parent | 0751e80559cbb34bc23639328938780c64063c92 (diff) | |
ugly but limping along progress
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'structs.go')
| -rw-r--r-- | structs.go | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/structs.go b/structs.go new file mode 100644 index 0000000..7a0f0ee --- /dev/null +++ b/structs.go @@ -0,0 +1,39 @@ +package main + +import "time" + +var me virtigoT + +// disable the GUI +func (b *virtigoT) Disable() { + // b.mainbox.Disable() +} + +// enable the GUI +func (b *virtigoT) Enable() { + // b.mainbox.Enable() +} + +// this app's variables +type virtigoT struct { + names []string + hypers []HyperT + droplets []DropletT +} + +// the stuff that is needed for a hypervisor +type HyperT struct { + Hostname string // the hypervisor hostname + Scan func() // the function to run to scan the hypervisor + Autoscan bool // to scan or not to scan + Delay time.Duration // how often to poll the hypervisor + Dog *time.Ticker // the watchdog timer itself +} + +// the stuff that is needed for a hypervisor +type DropletT struct { + Hostname string // the name of the virtual machine. should be unique (probably enforce this forever) + hname string // the hypervisor it's currently running on + h *HyperT // the hypervisor it's currently running on + lastpoll time.Time // the last time the droplet was seen running +} |
