cluster: introduce RegionIterator

Signed-off-by: Alejandro Mery <amery@jpi.io>
This commit is contained in:
2024-03-02 21:25:50 +00:00
parent 173dba0c3b
commit 9226cf2dfd
+7
View File
@@ -8,8 +8,15 @@ import (
var (
_ MachineIterator = (*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
type Region struct {
m *Cluster