cluster: use rings.ZoneID and rings.NodeID types
Signed-off-by: Alejandro Mery <amery@jpi.io>
This commit is contained in:
@@ -6,6 +6,8 @@ import (
|
||||
"os"
|
||||
|
||||
"gopkg.in/yaml.v3"
|
||||
|
||||
"git.jpi.io/amery/jpictl/pkg/rings"
|
||||
)
|
||||
|
||||
func (m *Cluster) init(opts *ScanOptions) error {
|
||||
@@ -45,7 +47,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 +60,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