Update dependencies
This commit is contained in:
74
vendor/tailscale.com/ipn/ipn_clone.go
generated
vendored
74
vendor/tailscale.com/ipn/ipn_clone.go
generated
vendored
@@ -17,6 +17,29 @@ import (
|
||||
"tailscale.com/types/ptr"
|
||||
)
|
||||
|
||||
// Clone makes a deep copy of LoginProfile.
|
||||
// The result aliases no memory with the original.
|
||||
func (src *LoginProfile) Clone() *LoginProfile {
|
||||
if src == nil {
|
||||
return nil
|
||||
}
|
||||
dst := new(LoginProfile)
|
||||
*dst = *src
|
||||
return dst
|
||||
}
|
||||
|
||||
// A compilation failure here means this code must be regenerated, with the command at the top of this file.
|
||||
var _LoginProfileCloneNeedsRegeneration = LoginProfile(struct {
|
||||
ID ProfileID
|
||||
Name string
|
||||
NetworkProfile NetworkProfile
|
||||
Key StateKey
|
||||
UserProfile tailcfg.UserProfile
|
||||
NodeID tailcfg.StableNodeID
|
||||
LocalUserID WindowsUserID
|
||||
ControlURL string
|
||||
}{})
|
||||
|
||||
// Clone makes a deep copy of Prefs.
|
||||
// The result aliases no memory with the original.
|
||||
func (src *Prefs) Clone() *Prefs {
|
||||
@@ -27,6 +50,7 @@ func (src *Prefs) Clone() *Prefs {
|
||||
*dst = *src
|
||||
dst.AdvertiseTags = append(src.AdvertiseTags[:0:0], src.AdvertiseTags...)
|
||||
dst.AdvertiseRoutes = append(src.AdvertiseRoutes[:0:0], src.AdvertiseRoutes...)
|
||||
dst.AdvertiseServices = append(src.AdvertiseServices[:0:0], src.AdvertiseServices...)
|
||||
if src.DriveShares != nil {
|
||||
dst.DriveShares = make([]*drive.Share, len(src.DriveShares))
|
||||
for i := range dst.DriveShares {
|
||||
@@ -61,6 +85,7 @@ var _PrefsCloneNeedsRegeneration = Prefs(struct {
|
||||
ForceDaemon bool
|
||||
Egg bool
|
||||
AdvertiseRoutes []netip.Prefix
|
||||
AdvertiseServices []string
|
||||
NoSNAT bool
|
||||
NoStatefulFiltering opt.Bool
|
||||
NetfilterMode preftype.NetfilterMode
|
||||
@@ -103,6 +128,16 @@ func (src *ServeConfig) Clone() *ServeConfig {
|
||||
}
|
||||
}
|
||||
}
|
||||
if dst.Services != nil {
|
||||
dst.Services = map[tailcfg.ServiceName]*ServiceConfig{}
|
||||
for k, v := range src.Services {
|
||||
if v == nil {
|
||||
dst.Services[k] = nil
|
||||
} else {
|
||||
dst.Services[k] = v.Clone()
|
||||
}
|
||||
}
|
||||
}
|
||||
dst.AllowFunnel = maps.Clone(src.AllowFunnel)
|
||||
if dst.Foreground != nil {
|
||||
dst.Foreground = map[string]*ServeConfig{}
|
||||
@@ -121,11 +156,50 @@ func (src *ServeConfig) Clone() *ServeConfig {
|
||||
var _ServeConfigCloneNeedsRegeneration = ServeConfig(struct {
|
||||
TCP map[uint16]*TCPPortHandler
|
||||
Web map[HostPort]*WebServerConfig
|
||||
Services map[tailcfg.ServiceName]*ServiceConfig
|
||||
AllowFunnel map[HostPort]bool
|
||||
Foreground map[string]*ServeConfig
|
||||
ETag string
|
||||
}{})
|
||||
|
||||
// Clone makes a deep copy of ServiceConfig.
|
||||
// The result aliases no memory with the original.
|
||||
func (src *ServiceConfig) Clone() *ServiceConfig {
|
||||
if src == nil {
|
||||
return nil
|
||||
}
|
||||
dst := new(ServiceConfig)
|
||||
*dst = *src
|
||||
if dst.TCP != nil {
|
||||
dst.TCP = map[uint16]*TCPPortHandler{}
|
||||
for k, v := range src.TCP {
|
||||
if v == nil {
|
||||
dst.TCP[k] = nil
|
||||
} else {
|
||||
dst.TCP[k] = ptr.To(*v)
|
||||
}
|
||||
}
|
||||
}
|
||||
if dst.Web != nil {
|
||||
dst.Web = map[HostPort]*WebServerConfig{}
|
||||
for k, v := range src.Web {
|
||||
if v == nil {
|
||||
dst.Web[k] = nil
|
||||
} else {
|
||||
dst.Web[k] = v.Clone()
|
||||
}
|
||||
}
|
||||
}
|
||||
return dst
|
||||
}
|
||||
|
||||
// A compilation failure here means this code must be regenerated, with the command at the top of this file.
|
||||
var _ServiceConfigCloneNeedsRegeneration = ServiceConfig(struct {
|
||||
TCP map[uint16]*TCPPortHandler
|
||||
Web map[HostPort]*WebServerConfig
|
||||
Tun bool
|
||||
}{})
|
||||
|
||||
// Clone makes a deep copy of TCPPortHandler.
|
||||
// The result aliases no memory with the original.
|
||||
func (src *TCPPortHandler) Clone() *TCPPortHandler {
|
||||
|
||||
Reference in New Issue
Block a user