2023-01-27 21:37:20 +00:00
|
|
|
// Copyright (c) Tailscale Inc & AUTHORS
|
|
|
|
// SPDX-License-Identifier: BSD-3-Clause
|
2022-11-30 21:04:43 +00:00
|
|
|
|
|
|
|
// Code generated by tailscale.com/cmd/cloner; DO NOT EDIT.
|
|
|
|
|
|
|
|
package ipnstate
|
|
|
|
|
|
|
|
import (
|
|
|
|
"net/netip"
|
|
|
|
|
|
|
|
"tailscale.com/tailcfg"
|
2024-08-20 17:36:30 +00:00
|
|
|
"tailscale.com/tka"
|
2023-03-08 22:16:23 +00:00
|
|
|
"tailscale.com/types/key"
|
2022-11-30 21:04:43 +00:00
|
|
|
)
|
|
|
|
|
2024-08-20 17:36:30 +00:00
|
|
|
// Clone makes a deep copy of TKAPeer.
|
2022-11-30 21:04:43 +00:00
|
|
|
// The result aliases no memory with the original.
|
2024-08-20 17:36:30 +00:00
|
|
|
func (src *TKAPeer) Clone() *TKAPeer {
|
2022-11-30 21:04:43 +00:00
|
|
|
if src == nil {
|
|
|
|
return nil
|
|
|
|
}
|
2024-08-20 17:36:30 +00:00
|
|
|
dst := new(TKAPeer)
|
2022-11-30 21:04:43 +00:00
|
|
|
*dst = *src
|
|
|
|
dst.TailscaleIPs = append(src.TailscaleIPs[:0:0], src.TailscaleIPs...)
|
2024-08-20 17:36:30 +00:00
|
|
|
dst.NodeKeySignature = *src.NodeKeySignature.Clone()
|
2022-11-30 21:04:43 +00:00
|
|
|
return dst
|
|
|
|
}
|
|
|
|
|
|
|
|
// A compilation failure here means this code must be regenerated, with the command at the top of this file.
|
2024-08-20 17:36:30 +00:00
|
|
|
var _TKAPeerCloneNeedsRegeneration = TKAPeer(struct {
|
|
|
|
Name string
|
|
|
|
ID tailcfg.NodeID
|
|
|
|
StableID tailcfg.StableNodeID
|
|
|
|
TailscaleIPs []netip.Addr
|
|
|
|
NodeKey key.NodePublic
|
|
|
|
NodeKeySignature tka.NodeKeySignature
|
2022-11-30 21:04:43 +00:00
|
|
|
}{})
|