cluster: use rings.ZoneID and rings.NodeID types

Signed-off-by: Alejandro Mery <amery@jpi.io>
This commit is contained in:
2024-06-02 22:04:54 +00:00
parent 6d89e0ea3c
commit 99dece1e43
10 changed files with 64 additions and 73 deletions
+2 -1
View File
@@ -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")