cluster: introduce NodeID and ZoneID types
Signed-off-by: Alejandro Mery <amery@jpi.io>
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user