cluster: use rings.ZoneID and rings.NodeID types
Signed-off-by: Alejandro Mery <amery@jpi.io>
This commit is contained in:
@@ -3,6 +3,8 @@ package cluster
|
||||
import (
|
||||
"net/netip"
|
||||
"strings"
|
||||
|
||||
"git.jpi.io/amery/jpictl/pkg/rings"
|
||||
)
|
||||
|
||||
// revive:disable:line-length-limit
|
||||
@@ -12,7 +14,7 @@ type Machine struct {
|
||||
zone *Zone
|
||||
logger `json:"-" yaml:"-"`
|
||||
|
||||
ID int
|
||||
ID rings.NodeID
|
||||
Name string `json:"-" yaml:"-"`
|
||||
|
||||
Inactive bool `json:"inactive,omitempty" yaml:"inactive,omitempty"`
|
||||
@@ -74,7 +76,7 @@ func (m *Machine) SetGateway(enabled bool) error {
|
||||
}
|
||||
|
||||
// Zone indicates the [Zone] this machine belongs to
|
||||
func (m *Machine) Zone() int {
|
||||
func (m *Machine) Zone() rings.ZoneID {
|
||||
return m.zone.ID
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user