From d38c909b0bf25e07eba490bd19d71bdecd0da268 Mon Sep 17 00:00:00 2001 From: Alejandro Mery Date: Sat, 26 Aug 2023 16:16:38 +0000 Subject: [PATCH] zones: introduce ZoneIterator, implemented by Zones Signed-off-by: Alejandro Mery --- pkg/zones/zones.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkg/zones/zones.go b/pkg/zones/zones.go index a092d9f..15d55ea 100644 --- a/pkg/zones/zones.go +++ b/pkg/zones/zones.go @@ -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