control/controlclient: make Status.Persist a PersistView

Signed-off-by: Maisem Ali <maisem@tailscale.com>
This commit is contained in:
Maisem Ali
2022-11-10 19:43:59 +05:00
committed by Maisem Ali
parent 4d330bac14
commit f00a49667d
6 changed files with 25 additions and 15 deletions

View File

@@ -43,6 +43,15 @@ func (p *Persist) PublicNodeKey() key.NodePublic {
return p.PrivateNodeKey.Public()
}
// PublicNodeKey returns the public key for the node key.
func (p PersistView) PublicNodeKey() key.NodePublic {
return p.ж.PublicNodeKey()
}
func (p PersistView) Equals(p2 PersistView) bool {
return p.ж.Equals(p2.ж)
}
func (p *Persist) Equals(p2 *Persist) bool {
if p == nil && p2 == nil {
return true