Rename Machine to Node (#1553)
This commit is contained in:
parent
096ac31bb3
commit
0030af3fa4
57 changed files with 5222 additions and 5238 deletions
|
@ -17,9 +17,9 @@ var (
|
|||
type Route struct {
|
||||
gorm.Model
|
||||
|
||||
MachineID uint64
|
||||
Machine Machine
|
||||
Prefix IPPrefix
|
||||
NodeID uint64
|
||||
Node Node
|
||||
Prefix IPPrefix
|
||||
|
||||
Advertised bool
|
||||
Enabled bool
|
||||
|
@ -29,7 +29,7 @@ type Route struct {
|
|||
type Routes []Route
|
||||
|
||||
func (r *Route) String() string {
|
||||
return fmt.Sprintf("%s:%s", r.Machine, netip.Prefix(r.Prefix).String())
|
||||
return fmt.Sprintf("%s:%s", r.Node, netip.Prefix(r.Prefix).String())
|
||||
}
|
||||
|
||||
func (r *Route) IsExitRoute() bool {
|
||||
|
@ -51,7 +51,7 @@ func (rs Routes) Proto() []*v1.Route {
|
|||
for _, route := range rs {
|
||||
protoRoute := v1.Route{
|
||||
Id: uint64(route.ID),
|
||||
Machine: route.Machine.Proto(),
|
||||
Node: route.Node.Proto(),
|
||||
Prefix: netip.Prefix(route.Prefix).String(),
|
||||
Advertised: route.Advertised,
|
||||
Enabled: route.Enabled,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue