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 e1186975a6
commit 6c875ae832
11 changed files with 72 additions and 57 deletions
+2 -2
View File
@@ -12,7 +12,7 @@ type Machine struct {
zone *Zone
logger `json:"-" yaml:"-"`
ID int
ID NodeID
Name string `json:"-" yaml:"-"`
Inactive bool `json:"inactive,omitempty" yaml:"inactive,omitempty"`
@@ -74,7 +74,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() ZoneID {
return m.zone.ID
}