net/tstun/table: add initial RoutingTable implementation
It is based on `*tempfork/device.AllowedIPs`. Updates tailscale/corp#8020 Signed-off-by: Maisem Ali <maisem@tailscale.com>
This commit is contained in:
@ -7,8 +7,22 @@ package device
|
||||
|
||||
import (
|
||||
"container/list"
|
||||
|
||||
"tailscale.com/types/key"
|
||||
)
|
||||
|
||||
type Peer struct {
|
||||
trieEntries list.List
|
||||
|
||||
key key.NodePublic
|
||||
}
|
||||
|
||||
func NewPeer(k key.NodePublic) *Peer {
|
||||
return &Peer{
|
||||
key: k,
|
||||
}
|
||||
}
|
||||
|
||||
func (p *Peer) Key() key.NodePublic {
|
||||
return p.key
|
||||
}
|
||||
|
Reference in New Issue
Block a user