cluster: introduce NodeID and ZoneID types

Signed-off-by: Alejandro Mery <amery@jpi.io>
This commit is contained in:
2024-05-28 19:40:18 +00:00
parent f45a8f21f3
commit ec62202f71
11 changed files with 65 additions and 31 deletions
+18
View File
@@ -0,0 +1,18 @@
package cluster
import "strconv"
type (
// ZoneID is the identifier of a [Zone]
ZoneID int
// NodeID is the identifier of a [Machine]
NodeID int
)
func (z ZoneID) String() string {
return strconv.Itoa(int(z))
}
func (n NodeID) String() string {
return strconv.Itoa(int(n))
}