cluster: use rings.ZoneID and rings.NodeID types
Signed-off-by: Alejandro Mery <amery@jpi.io>
This commit is contained in:
@@ -8,6 +8,7 @@ import (
|
||||
|
||||
"darvaza.org/core"
|
||||
|
||||
"git.jpi.io/amery/jpictl/pkg/rings"
|
||||
"git.jpi.io/amery/jpictl/pkg/wireguard"
|
||||
)
|
||||
|
||||
@@ -223,7 +224,7 @@ func (m *Machine) applyWireguardPeerConfig(ring int, pc wireguard.PeerConfig) er
|
||||
}
|
||||
}
|
||||
|
||||
func (m *Machine) applyZoneNodeID(zoneID, nodeID int) error {
|
||||
func (m *Machine) applyZoneNodeID(zoneID rings.ZoneID, nodeID rings.NodeID) error {
|
||||
switch {
|
||||
case zoneID == 0:
|
||||
return fmt.Errorf("invalid %s", "zoneID")
|
||||
|
||||
Reference in New Issue
Block a user