|
|
|
@ -13,6 +13,7 @@ import (
|
|
|
|
|
var ( |
|
|
|
|
_ MachineIterator = (*Zone)(nil) |
|
|
|
|
_ MachineIterator = (*Zones)(nil) |
|
|
|
|
_ ZoneIterator = (*Zones)(nil) |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
// A MachineIterator is a set of Machines we can iterate on
|
|
|
|
@ -20,6 +21,11 @@ type MachineIterator interface {
|
|
|
|
|
ForEachMachine(func(*Machine) bool) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// A ZoneIterator is a set of Zones we can iterate on
|
|
|
|
|
type ZoneIterator interface { |
|
|
|
|
ForEachZone(func(*Zone) bool) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// Zone represents one zone in a cluster
|
|
|
|
|
type Zone struct { |
|
|
|
|
zones *Zones |
|
|
|
|