summaryrefslogtreecommitdiff
path: root/structs.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-10-27 11:02:50 -0500
committerJeff Carr <[email protected]>2024-10-27 11:02:50 -0500
commit8fc2fbd9c9a6f05852cd597b246f0b4e634af7d7 (patch)
tree707c6044781eb4ef1f3ed9c4b756f6e605e4b6c8 /structs.go
parentd38865a6cf3d9e11803e9f565a0dd0c763de479d (diff)
track droplets reported from each hypervisor
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'structs.go')
-rw-r--r--structs.go11
1 files changed, 6 insertions, 5 deletions
diff --git a/structs.go b/structs.go
index 2671b52..715231a 100644
--- a/structs.go
+++ b/structs.go
@@ -21,13 +21,13 @@ func (b *virtigoT) Enable() {
// this app's variables
type virtigoT struct {
cluster *pb.Cluster // basic cluster settings
- delay time.Duration // how often to poll the hypervisors
hmap map[*pb.Hypervisor]*HyperT // map to the local struct
names []string
hypers []*HyperT
killcount int
unstable time.Time // the last time the cluster was incorrect
changed bool
+ hyperPollDelay time.Duration // how often to poll the hypervisors
unstableTimeout time.Duration // how long a droplet can be unstable until it's declared dead
clusterStableDuration time.Duration // how long the cluster must be stable before new droplets can be started
missingDropletTimeout time.Duration // how long a droplet can be missing for
@@ -35,8 +35,9 @@ type virtigoT struct {
// the stuff that is needed for a hypervisor
type HyperT struct {
- pb *pb.Hypervisor // the Hypervisor protobuf
- dog *time.Ticker // the watchdog timer itself
- lastpoll time.Time // the last time the hypervisor polled
- killcount int
+ pb *pb.Hypervisor // the Hypervisor protobuf
+ dog *time.Ticker // the watchdog timer itself
+ lastpoll time.Time // the last time the hypervisor polled
+ lastDroplets map[string]time.Time // the vm's in the last poll
+ killcount int // how many times the daemon has been forcably killed
}