cluster: use rings.ZoneID and rings.NodeID types
Signed-off-by: Alejandro Mery <amery@jpi.io>
This commit is contained in:
@@ -5,6 +5,7 @@ import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"git.jpi.io/amery/jpictl/pkg/rings"
|
||||
"gopkg.in/yaml.v3"
|
||||
)
|
||||
|
||||
@@ -45,7 +46,7 @@ func (m *Cluster) initZones(opts *ScanOptions) error {
|
||||
|
||||
func (m *Cluster) initZone(z *Zone, _ *ScanOptions) error {
|
||||
var hasMissing bool
|
||||
var lastMachineID int
|
||||
var lastMachineID rings.NodeID
|
||||
|
||||
z.zones = m
|
||||
z.logger = m
|
||||
@@ -58,7 +59,7 @@ func (m *Cluster) initZone(z *Zone, _ *ScanOptions) error {
|
||||
case p.ID == 0:
|
||||
hasMissing = true
|
||||
case p.ID > lastMachineID:
|
||||
lastMachineID = z.ID
|
||||
lastMachineID = p.ID
|
||||
}
|
||||
|
||||
return false
|
||||
|
||||
Reference in New Issue
Block a user