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