2023-03-28 20:20:07 +01:00
|
|
|
/* SPDX-License-Identifier: MIT
|
|
|
|
*
|
|
|
|
* Copyright (C) 2017-2023 WireGuard LLC. All Rights Reserved.
|
|
|
|
*/
|
|
|
|
|
|
|
|
package device
|
|
|
|
|
|
|
|
import (
|
|
|
|
"container/list"
|
2023-03-29 17:49:33 +01:00
|
|
|
|
|
|
|
"tailscale.com/types/key"
|
2023-03-28 20:20:07 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
type Peer struct {
|
|
|
|
trieEntries list.List
|
2023-03-29 17:49:33 +01:00
|
|
|
|
|
|
|
key key.NodePublic
|
|
|
|
}
|
|
|
|
|
|
|
|
func NewPeer(k key.NodePublic) *Peer {
|
|
|
|
return &Peer{
|
|
|
|
key: k,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (p *Peer) Key() key.NodePublic {
|
|
|
|
return p.key
|
2023-03-28 20:20:07 +01:00
|
|
|
}
|