|
|
@ -8,8 +8,15 @@ import ( |
|
|
|
var ( |
|
|
|
var ( |
|
|
|
_ MachineIterator = (*Region)(nil) |
|
|
|
_ MachineIterator = (*Region)(nil) |
|
|
|
_ ZoneIterator = (*Region)(nil) |
|
|
|
_ ZoneIterator = (*Region)(nil) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
_ RegionIterator = (*Cluster)(nil) |
|
|
|
) |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// A RegionIterator is a set of Regions we can iterate on
|
|
|
|
|
|
|
|
type RegionIterator interface { |
|
|
|
|
|
|
|
ForEachRegion(func(*Region) bool) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Region represents a group of zones geographically related
|
|
|
|
// Region represents a group of zones geographically related
|
|
|
|
type Region struct { |
|
|
|
type Region struct { |
|
|
|
m *Cluster |
|
|
|
m *Cluster |
|
|
|