diff options
Diffstat (limited to 'types/netmap')
| -rw-r--r-- | types/netmap/netmap.go | 30 |
1 files changed, 28 insertions, 2 deletions
diff --git a/types/netmap/netmap.go b/types/netmap/netmap.go index b3a9df8ba..72ca82ac2 100644 --- a/types/netmap/netmap.go +++ b/types/netmap/netmap.go @@ -19,6 +19,34 @@ import ( "tailscale.com/wgengine/filter" ) +type NetworkMapView struct { + nm *NetworkMap +} + +type GUIPeerNode struct { + ID tailcfg.StableNodeID + BaseOrFQDNName string // no "." substring if in your tailnet, else FQDN + Owner tailcfg.UserID // user or fake userid for tagged nodes + IPv4 netip.Addr // may be be zero value (empty string in JSON) + IPv6 netip.Addr // may be be zero value (empty string in JSON) + MachineStatus tailcfg.MachineStatus + Hostinfo GUIHostInfo + + IsExitNode bool +} + +type GUIHostInfo struct { + ShareeNode bool `json:",omitempty"` // indicates this node exists in netmap because it's owned by a shared-to user +} + +type GUINetworkMap struct { + SelfNode *tailcfg.Node // TODO: GUISelfNode ? + Peers []*GUIPeerNode + UserProfiles map[tailcfg.UserID]tailcfg.UserProfile + + TKAEnabled bool +} + // NetworkMap is the current state of the world. // // The fields should all be considered read-only. They might @@ -70,8 +98,6 @@ type NetworkMap struct { // hash of the latest update message to tick through TKA). TKAHead tka.AUMHash - // ACLs - User tailcfg.UserID // Domain is the current Tailnet name. |
