diff options
Diffstat (limited to 'main.go')
| -rw-r--r-- | main.go | 13 |
1 files changed, 8 insertions, 5 deletions
@@ -38,16 +38,17 @@ func main() { } // set defaults - me.unstable = time.Now() // initialize the grid as unstable - me.delay = 5 * time.Second // how often to poll the hypervisors + me.unstable = time.Now() // initialize the grid as unstable me.changed = false - // me.dmap = make(map[*pb.Droplet]*DropletT) me.hmap = make(map[*pb.Hypervisor]*HyperT) // how long a droplet can be missing until it's declared dead me.unstableTimeout = 17 * time.Second me.missingDropletTimeout = time.Minute // not sure the difference between these values + // how often to poll the hypervisors + me.hyperPollDelay = 5 * time.Second + // how long the cluster must be stable before new droplets can be started me.clusterStableDuration = 37 * time.Second @@ -141,12 +142,14 @@ func main() { log.Println("result:", result) os.Exit(0) } + // initialize each hypervisor for _, pbh := range me.cluster.Hypervisors { // this is a new unknown droplet (not in the config file) - h := new(HyperT) + var h *HyperT + h = new(HyperT) h.pb = pbh - + h.lastDroplets = make(map[string]time.Time) h.lastpoll = time.Now() me.hmap[pbh] = h |
