9307f08559
Signed-off-by: Alejandro Mery <amery@jpi.io>
25 lines
339 B
Go
25 lines
339 B
Go
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 {
|
|
if z > 0 {
|
|
return strconv.Itoa(int(z))
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (n NodeID) String() string {
|
|
if n > 0 {
|
|
return strconv.Itoa(int(n))
|
|
}
|
|
return ""
|
|
}
|